File tree 1 file changed +5
-1
lines changed
server/src/test/java/org/elasticsearch/cluster/coordination
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public void setupNodes() {
67
67
68
68
cs1 = createCoordinationState (new InMemoryPersistedState (0L , initialStateNode1 ), node1 );
69
69
cs2 = createCoordinationState (new InMemoryPersistedState (0L , initialStateNode2 ), node2 );
70
- cs3 = createCoordinationState (new InMemoryPersistedState (0L , initialStateNode3 ), node2 );
70
+ cs3 = createCoordinationState (new InMemoryPersistedState (0L , initialStateNode3 ), node3 );
71
71
}
72
72
73
73
private DiscoveryNode createNode (String id ) {
@@ -252,6 +252,10 @@ public void testHandleClientValue() {
252
252
PublishRequest publishRequest = cs1 .handleClientValue (state2 );
253
253
assertThat (publishRequest .getAcceptedState (), equalTo (state2 ));
254
254
assertThat (cs1 .getLastPublishedVersion (), equalTo (state2 .version ()));
255
+ // check that another join does not mess with lastPublishedVersion
256
+ Join v3 = cs3 .handleStartJoin (startJoinRequest1 );
257
+ assertTrue (cs1 .handleJoin (v3 ));
258
+ assertThat (cs1 .getLastPublishedVersion (), equalTo (state2 .version ()));
255
259
}
256
260
257
261
public void testHandleClientValueWhenElectionNotWon () {
You can’t perform that action at this time.
0 commit comments