curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [24/50] curator git commit: set watched instances to true to check that as well
Date Wed, 06 May 2015 04:56:21 GMT
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-160
Commit: 0178c830385854bb8737afba301c7896604e4547
Parents: 915d83a
Author: randgalt <randgalt@apache.org>
Authored: Tue Apr 21 12:35:23 2015 -0500
Committer: randgalt <randgalt@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.");
         }


Mime
View raw message