You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2015/04/21 19:35:27 UTC

curator git commit: set watched instances to true to check that as well

Repository: curator
Updated Branches:
  refs/heads/CURATOR-164 915d83add -> 0178c8303


set watched instances to true to check that as well


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/0178c830
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/0178c830
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/0178c830

Branch: refs/heads/CURATOR-164
Commit: 0178c830385854bb8737afba301c7896604e4547
Parents: 915d83a
Author: randgalt <ra...@apache.org>
Authored: Tue Apr 21 12:35:23 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Tue Apr 21 12:35:23 2015 -0500

----------------------------------------------------------------------
 .../org/apache/curator/x/discovery/TestServiceDiscovery.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/0178c830/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
index 40d491a..3b45494 100644
--- a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
+++ b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestServiceDiscovery.java
@@ -340,7 +340,7 @@ public class TestServiceDiscovery extends BaseClassForTests
             client.start();
 
             ServiceInstance<String> instance = ServiceInstance.<String>builder().payload("thing").name(name).port(10064).build();
-            ServiceDiscovery<String> discovery = ServiceDiscoveryBuilder.builder(String.class).basePath("/test").client(client).thisInstance(instance).serializer(slowSerializer).build();
+            ServiceDiscovery<String> discovery = ServiceDiscoveryBuilder.builder(String.class).basePath("/test").client(client).thisInstance(instance).serializer(slowSerializer).watchInstances(true).build();
             closeables.add(discovery);
             discovery.start();
 
@@ -352,7 +352,7 @@ public class TestServiceDiscovery extends BaseClassForTests
             discovery.unregisterService(instance);
             restartLatch.countDown();
 
-            TimeUnit.SECONDS.sleep(1); // Wait for the rest of registration to finish.
+            new Timing().sleepABit(); // Wait for the rest of registration to finish.
 
             Assert.assertTrue(discovery.queryForInstances(name).isEmpty(), "Service should have unregistered.");
         }