Skip to content

Commit 3bec606

Browse files
committed
jaja
1 parent 6611e58 commit 3bec606

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/test/java/org/elasticsearch/cluster/coordination/CoordinationStateTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ public void testStartJoinAfterBootstrap() {
131131

132132
StartJoinRequest startJoinRequest2 = new StartJoinRequest(randomFrom(node1, node2),
133133
randomLongBetween(0, startJoinRequest1.getTerm()));
134-
expectThrows(CoordinationStateRejectedException.class, () -> cs1.handleStartJoin(startJoinRequest2));
134+
assertThat(expectThrows(CoordinationStateRejectedException.class, () -> cs1.handleStartJoin(startJoinRequest2)).getMessage(),
135+
containsString("not greater than current term"));
136+
StartJoinRequest startJoinRequest3 = new StartJoinRequest(randomFrom(node1, node2),
137+
startJoinRequest1.getTerm());
138+
assertThat(expectThrows(CoordinationStateRejectedException.class, () -> cs1.handleStartJoin(startJoinRequest3)).getMessage(),
139+
containsString("not greater than current term"));
135140
}
136141

137142
public void testJoinBeforeBootstrap() {

0 commit comments

Comments
 (0)