Skip to content

Commit

Permalink
Fix assertion in testReturnsImmediatelyIfVoteAlreadyWithdrawn
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DaveCTurner committed Aug 17, 2023
1 parent bb2a30f commit acd6a4d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ public void testReturnsImmediatelyIfVoteAlreadyWithdrawn() {
new AddVotingConfigExclusionsRequest("other1"),
expectSuccess(r -> {
assertNotNull(r);
assertThat(clusterService.getClusterApplierService().state().getVotingConfigExclusions(), contains(otherNode1Exclusion));
assertAllExclusionsApplied(state);
final var finalState = clusterService.getClusterApplierService().state();
assertThat(finalState.getVotingConfigExclusions(), contains(otherNode1Exclusion));
assertAllExclusionsApplied(finalState);
countDownLatch.countDown();
})
);
Expand Down

0 comments on commit acd6a4d

Please sign in to comment.