You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two initiators for the same path, same `SmartLifecycleRoleController` and, finally, same `adapter`.
So, one initiator after `yield()` stops the `adapter` and at the same time another starts it.
Since there is no barrier in between events and assertion, we end up with an early "re-granting".
* Add `CountDownLatch yieldBarrier` to `countDown()` after performing second `adapter.isRunning()` assert
* `LeaderEventPublisher` waits for the `yieldBarrier` after the first `OnRevokedEvent`
Copy file name to clipboardExpand all lines: spring-integration-zookeeper/src/test/java/org/springframework/integration/zookeeper/event/ZookeeperLeaderTests.java
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@
24
24
25
25
importjava.util.Collections;
26
26
importjava.util.concurrent.BlockingQueue;
27
+
importjava.util.concurrent.CountDownLatch;
27
28
importjava.util.concurrent.LinkedBlockingQueue;
28
29
importjava.util.concurrent.TimeUnit;
29
30
@@ -62,6 +63,8 @@ public class ZookeeperLeaderTests extends ZookeeperTestSupport {
0 commit comments