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 2017/07/23 02:41:28 UTC
[20/23] curator git commit: It seems that, for classic connection,
the first events are SUSPENDED/LOST, How did this ever work?
It seems that, for classic connection, the first events are SUSPENDED/LOST, How did this ever work?
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/73cdf160
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/73cdf160
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/73cdf160
Branch: refs/heads/master
Commit: 73cdf1608460c8187928febcd3829ad4ebec8951
Parents: 4ce1f9d
Author: randgalt <ra...@apache.org>
Authored: Sat Jul 22 10:47:55 2017 -0500
Committer: randgalt <ra...@apache.org>
Committed: Sat Jul 22 10:47:55 2017 -0500
----------------------------------------------------------------------
.../client/TestResetConnectionWithBackgroundFailure.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/73cdf160/curator-recipes/src/test/java/org/apache/curator/framework/client/TestResetConnectionWithBackgroundFailure.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/client/TestResetConnectionWithBackgroundFailure.java b/curator-recipes/src/test/java/org/apache/curator/framework/client/TestResetConnectionWithBackgroundFailure.java
index 852d9aa..bfc9cf4 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/client/TestResetConnectionWithBackgroundFailure.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/client/TestResetConnectionWithBackgroundFailure.java
@@ -86,6 +86,11 @@ public class TestResetConnectionWithBackgroundFailure extends BaseClassForTests
client.getConnectionStateListenable().addListener(listener1);
log.debug("Starting ZK server");
server.restart();
+ if ( Boolean.getBoolean("curator-use-classic-connection-handling") )
+ {
+ Assert.assertEquals(listenerSequence.poll(forWaiting.milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.SUSPENDED);
+ Assert.assertEquals(listenerSequence.poll(forWaiting.milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.LOST);
+ }
Assert.assertEquals(listenerSequence.poll(forWaiting.milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.CONNECTED);
log.debug("Stopping ZK server");