doh - filterIsSetLatch has to be reset for each iteration (in setup). I can't be a final field
Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/e819268d Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/e819268d Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/e819268d Branch: refs/heads/CURATOR-426 Commit: e819268dc30703ed251a78e8ab769c85b6afb17f Parents: 73cdf16 Author: randgalt <[email protected]> Authored: Sat Jul 22 11:19:37 2017 -0500 Committer: randgalt <[email protected]> Committed: Sat Jul 22 11:19:37 2017 -0500 ---------------------------------------------------------------------- .../apache/curator/x/async/migrations/TestMigrationManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/e819268d/curator-x-async/src/test/java/org/apache/curator/x/async/migrations/TestMigrationManager.java ---------------------------------------------------------------------- diff --git a/curator-x-async/src/test/java/org/apache/curator/x/async/migrations/TestMigrationManager.java b/curator-x-async/src/test/java/org/apache/curator/x/async/migrations/TestMigrationManager.java index bc724f5..6cc7fd1 100644 --- a/curator-x-async/src/test/java/org/apache/curator/x/async/migrations/TestMigrationManager.java +++ b/curator-x-async/src/test/java/org/apache/curator/x/async/migrations/TestMigrationManager.java @@ -67,7 +67,7 @@ public class TestMigrationManager extends CompletableBaseClassForTests private CuratorOp v3op; private MigrationManager manager; private final AtomicReference<CountDownLatch> filterLatch = new AtomicReference<>(); - private final CountDownLatch filterIsSetLatch = new CountDownLatch(1); + private CountDownLatch filterIsSetLatch; @BeforeMethod @Override @@ -75,6 +75,8 @@ public class TestMigrationManager extends CompletableBaseClassForTests { super.setup(); + filterIsSetLatch = new CountDownLatch(1); + CuratorFramework rawClient = CuratorFrameworkFactory.newClient(server.getConnectString(), timing.session(), timing.connection(), new RetryOneTime(100)); rawClient.start();
