Skip to content

Commit acd6a4d

Browse files
committed
Fix assertion in testReturnsImmediatelyIfVoteAlreadyWithdrawn
This test is today asserting that the _initial_ state has all the expected exclusions, but it should be checking the _final_ state. Relates elastic#98386
1 parent bb2a30f commit acd6a4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/test/java/org/elasticsearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsActionTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ public void testReturnsImmediatelyIfVoteAlreadyWithdrawn() {
232232
new AddVotingConfigExclusionsRequest("other1"),
233233
expectSuccess(r -> {
234234
assertNotNull(r);
235-
assertThat(clusterService.getClusterApplierService().state().getVotingConfigExclusions(), contains(otherNode1Exclusion));
236-
assertAllExclusionsApplied(state);
235+
final var finalState = clusterService.getClusterApplierService().state();
236+
assertThat(finalState.getVotingConfigExclusions(), contains(otherNode1Exclusion));
237+
assertAllExclusionsApplied(finalState);
237238
countDownLatch.countDown();
238239
})
239240
);

0 commit comments

Comments
 (0)