You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "Flaugh24 (via GitHub)" <gi...@apache.org> on 2023/05/16 13:22:01 UTC

[GitHub] [ignite-3] Flaugh24 commented on a diff in pull request #2066: IGNITE-19464 Move out logic of applying cluster configuration from ClusterManagementGroupManager

Flaugh24 commented on code in PR #2066:
URL: https://github.com/apache/ignite-3/pull/2066#discussion_r1195158045


##########
modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/ItClusterManagerTest.java:
##########
@@ -351,6 +355,45 @@ void testLeaderChangeDuringJoin(TestInfo testInfo) throws Exception {
         assertThat(node.clusterManager().onJoinReady(), willCompleteSuccessfully());
     }
 
+    @Test
+    void testClusterConfigurationIsRemovedFromClusterStateAfterUpdating(TestInfo testInfo) throws Exception {
+        // Start a cluster of 3 nodes so that the CMG leader node could be stopped later.
+        startCluster(3, testInfo);
+
+        String[] cmgNodes = clusterNodeNames();
+
+        // Start the CMG on all 3 nodes.
+        String clusterConfiguration = "security.authentication.enabled:true";
+        initCluster(cmgNodes, cmgNodes, clusterConfiguration);
+
+        // Find the CMG leader and stop it.
+        MockNode leaderNode = findLeaderNode(cluster).orElseThrow();
+
+        // Read cluster configuration from the cluster state and remove it.
+        UpdateDistributedConfigurationAction configurationAction = leaderNode.clusterManager()
+                .clusterConfigurationToUpdate()
+                .get();
+
+        assertThat(configurationAction.configuration(), is(clusterConfiguration));
+        configurationAction.nextAction().apply(CompletableFuture.completedFuture(null)).join();
+
+        // Stop the cluster leader.
+        stopNodes(List.of(leaderNode));

Review Comment:
   To verify the new leader doesn't have configuration to update



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org