Skip to content

Commit

Permalink
Rename two methods in unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Mar 19, 2022
1 parent e94fc0a commit 89ad4b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,17 +329,17 @@ public void testJoinWithHigherTermElectsLeader() {
() -> new StatusInfo(HEALTHY, "healthy-info")
);
assertFalse(isLocalNodeElectedMaster());
assertNull(coordinator.getStateForMasterService().nodes().getMasterNodeId());
assertNull(coordinator.getStateForClusterManagerService().nodes().getMasterNodeId());
long newTerm = initialTerm + randomLongBetween(1, 10);
SimpleFuture fut = joinNodeAsync(
new JoinRequest(node1, newTerm, Optional.of(new Join(node1, node0, newTerm, initialTerm, initialVersion)))
);
assertEquals(Coordinator.Mode.LEADER, coordinator.getMode());
assertNull(coordinator.getStateForMasterService().nodes().getMasterNodeId());
assertNull(coordinator.getStateForClusterManagerService().nodes().getMasterNodeId());
deterministicTaskQueue.runAllRunnableTasks();
assertTrue(fut.isDone());
assertTrue(isLocalNodeElectedMaster());
assertTrue(coordinator.getStateForMasterService().nodes().isLocalNodeElectedMaster());
assertTrue(coordinator.getStateForClusterManagerService().nodes().isLocalNodeElectedMaster());
}

public void testJoinWithHigherTermButBetterStateGetsRejected() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ public void testDeltas() {
DiscoveryNodes.Delta delta = discoNodesB.delta(discoNodesA);

if (masterA == null) {
assertThat(delta.previousMasterNode(), nullValue());
assertThat(delta.previousClusterManagerNode(), nullValue());
} else {
assertThat(delta.previousMasterNode().getId(), equalTo(masterAId));
assertThat(delta.previousClusterManagerNode().getId(), equalTo(masterAId));
}
if (masterB == null) {
assertThat(delta.newMasterNode(), nullValue());
Expand Down

0 comments on commit 89ad4b9

Please sign in to comment.