Github user afine commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/157#discussion_r98574493 --- Diff: src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java --- @@ -839,12 +839,25 @@ public void converseWithFollower(InputArchive ia, OutputArchive oa, Assert.assertEquals(1, f.self.getAcceptedEpoch()); Assert.assertEquals(1, f.self.getCurrentEpoch()); + //Wait for the transactions to be written out. The thread that writes them out + // does not send anything back when it is done. + long start = System.currentTimeMillis(); + while (createSessionZxid != f.fzk.getLastProcessedZxid() && (System.currentTimeMillis() - start) < 50) { --- End diff -- just an idea, not sure if it is worth the effort and it may be outside the scope of this patch. we could play with the test infrastructure here a little bit and do some dependency injection in `createFollower` that can let us track if db clearing and snapshotting occurs when expected. this may help prevent hard to track race conditions with tests like this in the future.
--- 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. ---