Skip to content

Commit 4472a87

Browse files
committed
Fix LeaderInitiatorTests race condition
https://build.spring.io/browse/INTEXT-SIH1-10 When `LeaderInitiator` yields its leadership there is a good chance that it will obtain it back, so there is no guaranty that it isn't leader after revoking
1 parent 6e7b4cf commit 4472a87

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ public void publishOnRevoked(Object source, Context context, String role) {
166166
initiator1.getContext().yield();
167167

168168
assertThat(revoked11.await(10, TimeUnit.SECONDS), is(true));
169-
assertThat(initiator1.getContext().isLeader(), is(false));
170169

171170
initiator1.destroy();
172171
}

0 commit comments

Comments
 (0)