sashapolo commented on code in PR #853:
URL: https://github.com/apache/ignite-3/pull/853#discussion_r889170943
##########
modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java:
##########
@@ -471,4 +468,31 @@ void testClusterStateValidation() {
)
);
}
+
+ /**
+ * Tests that {@link JoinRequestCommand} and {@link JoinReadyCommand} are
idempotent.
+ */
+ @Test
+ void testJoinCommandsIdempotence() {
+ ClusterState state = new ClusterState(
+ List.of("foo"),
+ List.of("bar"),
+ IgniteProductVersion.CURRENT_VERSION,
+ new ClusterTag("cluster")
+ );
+
+ assertThat(cluster.get(0).raftService.initClusterState(state),
willCompleteSuccessfully());
+
+ CmgRaftService service = cluster.get(1).raftService;
+
+ assertThat(service.startJoinCluster(state.clusterTag()),
willCompleteSuccessfully());
+
+ assertThat(service.startJoinCluster(state.clusterTag()),
willCompleteSuccessfully());
+
+ assertThat(service.completeJoinCluster(), willCompleteSuccessfully());
+
+ assertThat(service.completeJoinCluster(), willCompleteSuccessfully());
+
+ assertThat(service.completeJoinCluster(), willCompleteSuccessfully());
+ }
Review Comment:
I don't know, it shouldn't happen in a normal case scenario...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]