Github user cammckenzie commented on a diff in the pull request: https://github.com/apache/curator/pull/197#discussion_r98551865 --- Diff: curator-client/src/main/java/org/apache/curator/ConnectionState.java --- @@ -160,13 +162,33 @@ public void process(WatchedEvent event) } } + // only wait during tests + assert waitOnExpiredEvent(event.getState()); --- End diff -- I don't think that it's reasonable to assume that assertions will only be turned on during testing. If you look at something like LeaderSelector, it has specific code in there to support unit testing (the debugLeadershipLatch variable). If you can cause the problem to occur without this code though, then it should be removed. I had a quick play with it and I couldn't seem to reproduce it without this code though.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---