tkalkirill commented on code in PR #2817:
URL: https://github.com/apache/ignite-3/pull/2817#discussion_r1390739363


##########
modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/ItClusterManagerTest.java:
##########
@@ -102,6 +99,26 @@ void testInit(TestInfo testInfo) throws Exception {
         assertThat(cluster.get(1).logicalTopologyNodes(), 
will(containsInAnyOrder(expectedTopology)));
     }
 
+    /**
+     * Tests initial cluster setup with provided configuration.
+     */
+    @Test
+    void testInitWithProvidedConfiguration(TestInfo testInfo) throws Exception 
{
+        startCluster(3, testInfo);
+
+        String[] cmgNodes = { cluster.get(0).name() };
+
+        String[] metaStorageNodes = { cluster.get(1).name() };
+
+        String configuration = "{security: {enabled: true}}";
+
+        initCluster(metaStorageNodes, cmgNodes, configuration);
+
+        for (MockNode node : cluster) {

Review Comment:
   Can we then check the configuration itself and not the string representation?



##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java:
##########
@@ -828,8 +792,14 @@ public CompletableFuture<Void> onJoinReady() {
         }
     }
 
-    public CompletableFuture<UpdateDistributedConfigurationAction> 
clusterConfigurationToUpdate() {
-        return updateDistributedConfigurationActionFuture;
+    /**
+     * Returns a future resolving to the initial cluster configuration. The 
resulting configuration may be {@code null} if not provided by
+     * the user.
+     *
+     * @return a CompletableFuture that, upon completion, provides the initial 
cluster configuration, which may be {@code null}.

Review Comment:
   There is not enough example in what form the configuration will be returned 
in string representation.



##########
modules/configuration/src/test/java/org/apache/ignite/internal/configuration/ConfigurationChangerTest.java:
##########
@@ -568,6 +570,26 @@ void testUpdateStorageRevisionOnEmptyChanges() throws 
Exception {
         assertEquals(3, storage.lastRevision().get(1, SECONDS));
     }
 
+    @Test
+    public void initializeWith() throws Exception {
+        // When we initialize the configuration with a source, the 
configuration should be updated with the values from the source.
+        String initialConfiguration = 
"def:{child:{defStr:initialStr,arr:[bar]}}";
+        com.typesafe.config.Config config = 
ConfigFactory.parseString(initialConfiguration);
+        ConfigurationSource hoconSource = 
HoconConverter.hoconSource(config.root());
+
+        var changer = createChanger(DefaultsConfiguration.KEY);

Review Comment:
   Please don't use `var` it's not clear what type it is.



-- 
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]

Reply via email to