Longer timeout for ZK tests Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/5c82532f Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/5c82532f Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/5c82532f
Branch: refs/heads/site Commit: 5c82532f39428d5e0505f338b1201262c3518468 Parents: caad060 Author: Terence Yim <[email protected]> Authored: Wed Feb 11 00:12:11 2015 -0800 Committer: Terence Yim <[email protected]> Committed: Wed Feb 11 00:12:11 2015 -0800 ---------------------------------------------------------------------- .../apache/twill/discovery/DiscoveryServiceTestBase.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/5c82532f/twill-discovery-core/src/test/java/org/apache/twill/discovery/DiscoveryServiceTestBase.java ---------------------------------------------------------------------- diff --git a/twill-discovery-core/src/test/java/org/apache/twill/discovery/DiscoveryServiceTestBase.java b/twill-discovery-core/src/test/java/org/apache/twill/discovery/DiscoveryServiceTestBase.java index a14e823..23deddc 100644 --- a/twill-discovery-core/src/test/java/org/apache/twill/discovery/DiscoveryServiceTestBase.java +++ b/twill-discovery-core/src/test/java/org/apache/twill/discovery/DiscoveryServiceTestBase.java @@ -100,21 +100,21 @@ public abstract class DiscoveryServiceTestBase { }, Threads.SAME_THREAD_EXECUTOR); // An empty list will be received first, as no endpoint has been registered. - List<Discoverable> discoverables = events.poll(5, TimeUnit.SECONDS); + List<Discoverable> discoverables = events.poll(20, TimeUnit.SECONDS); Assert.assertNotNull(discoverables); Assert.assertTrue(discoverables.isEmpty()); // Register a service Cancellable cancellable = register(discoveryService, serviceName, "localhost", 10000); - discoverables = events.poll(5, TimeUnit.SECONDS); + discoverables = events.poll(20, TimeUnit.SECONDS); Assert.assertNotNull(discoverables); Assert.assertEquals(1, discoverables.size()); // Register another service endpoint Cancellable cancellable2 = register(discoveryService, serviceName, "localhost", 10001); - discoverables = events.poll(5, TimeUnit.SECONDS); + discoverables = events.poll(20, TimeUnit.SECONDS); Assert.assertNotNull(discoverables); Assert.assertEquals(2, discoverables.size()); @@ -123,10 +123,10 @@ public abstract class DiscoveryServiceTestBase { cancellable2.cancel(); // There could be more than one event triggered, but the last event should be an empty list. - discoverables = events.poll(5, TimeUnit.SECONDS); + discoverables = events.poll(20, TimeUnit.SECONDS); Assert.assertNotNull(discoverables); if (!discoverables.isEmpty()) { - discoverables = events.poll(5, TimeUnit.SECONDS); + discoverables = events.poll(20, TimeUnit.SECONDS); } Assert.assertTrue(discoverables.isEmpty());
