SLING-5298 : part 1: close VirtualInstance properly - and avoid the 100sec unnecessary sleep

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1714599 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/sling/discovery/impl/DiscoveryWithSyncTokenTest.java b/src/test/java/org/apache/sling/discovery/impl/DiscoveryWithSyncTokenTest.java
index d7bd772..a42c43a 100644
--- a/src/test/java/org/apache/sling/discovery/impl/DiscoveryWithSyncTokenTest.java
+++ b/src/test/java/org/apache/sling/discovery/impl/DiscoveryWithSyncTokenTest.java
@@ -60,6 +60,7 @@
         b1.setDebugName("i1").newRepository("/var/twon/", true);
         b1.setConnectorPingInterval(1).setMinEventDelay(1).setConnectorPingTimeout(60);
         VirtualInstance i1 = b1.build();
+        instances.add(i1);
         i1.bindTopologyEventListener(new TopologyEventListener() {
             
             @Override
@@ -78,6 +79,7 @@
         i1.heartbeatsAndCheckView();
         i2.heartbeatsAndCheckView();
         
-        Thread.sleep(99999);
+        Thread.sleep(999);
+        //TODO: finalize test
     }
 }