@@ -329,7 +329,7 @@ public void testHandleClientValueWithOldVersion() {
329329 containsString ("lower or equal to last published version" ));
330330 }
331331
332- public void testHandleClientValueWithReconfigurationWhileAlreadyReconfiguring () {
332+ public void testHandleClientValueWithDifferentReconfigurationWhileAlreadyReconfiguring () {
333333 VotingConfiguration initialConfig = new VotingConfiguration (Collections .singleton (node1 .getId ()));
334334 ClusterState state1 = clusterState (0L , 1L , node1 , initialConfig , initialConfig , 42L );
335335 cs1 .setInitialState (state1 );
@@ -350,6 +350,25 @@ public void testHandleClientValueWithReconfigurationWhileAlreadyReconfiguring()
350350 containsString ("only allow reconfiguration while not already reconfiguring" ));
351351 }
352352
353+ public void testHandleClientValueWithSameReconfigurationWhileAlreadyReconfiguring () {
354+ VotingConfiguration initialConfig = new VotingConfiguration (Collections .singleton (node1 .getId ()));
355+ ClusterState state1 = clusterState (0L , 1L , node1 , initialConfig , initialConfig , 42L );
356+ cs1 .setInitialState (state1 );
357+ StartJoinRequest startJoinRequest1 = new StartJoinRequest (node1 , randomLongBetween (1 , 5 ));
358+ Join v1 = cs1 .handleStartJoin (startJoinRequest1 );
359+ Join v2 = cs2 .handleStartJoin (startJoinRequest1 );
360+ assertTrue (cs1 .handleJoin (v1 ));
361+ assertTrue (cs1 .electionWon ());
362+ assertTrue (cs1 .handleJoin (v2 ));
363+
364+ VotingConfiguration newConfig1 = new VotingConfiguration (Collections .singleton (node2 .getId ()));
365+ ClusterState state2 = clusterState (startJoinRequest1 .getTerm (), 2L , node1 , initialConfig , newConfig1 , 42L );
366+ PublishRequest publishRequest = cs1 .handleClientValue (state2 );
367+ cs1 .handlePublishRequest (publishRequest );
368+ ClusterState state3 = clusterState (startJoinRequest1 .getTerm (), 3L , node1 , initialConfig , newConfig1 , 42L );
369+ cs1 .handleClientValue (state3 );
370+ }
371+
353372 public void testHandleClientValueWithIllegalCommittedConfigurationChange () {
354373 assumeTrue ("test only works with assertions enabled" , Assertions .ENABLED );
355374 VotingConfiguration initialConfig = new VotingConfiguration (Collections .singleton (node1 .getId ()));
0 commit comments