ibessonov commented on code in PR #2879:
URL: https://github.com/apache/ignite-3/pull/2879#discussion_r1405983925


##########
modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/TestIgnitionManager.java:
##########
@@ -108,33 +142,34 @@ private static InitParameters 
applyTestDefaultsToClusterConfig(InitParameters pa
                 .metaStorageNodeNames(params.metaStorageNodeNames())
                 .cmgNodeNames(params.cmgNodeNames());
 
+        
builder.clusterConfiguration(applyTestDefaultsToConfig(params.clusterConfiguration(),
 DEFAULT_CLUSTER_CONFIG));
+
+        return builder.build();
+    }
+
+    private static String applyTestDefaultsToConfig(@Nullable String 
configStr, Map<String, String> defaults) {
+        if (configStr == null) {
+            configStr = "{}";
+        }
+
         ConfigDocument configDocument;
 
-        if (params.clusterConfiguration() == null) {
-            configDocument = ConfigDocumentFactory.parseString("{}");
-        } else {
-            configDocument = 
ConfigDocumentFactory.parseString(params.clusterConfiguration());
+        try {
+            configDocument = ConfigDocumentFactory.parseString(configStr);
+        } catch (ConfigException e) {
+            // Preserve original broken content, it might be broken on purpose.

Review Comment:
   Sometimes we test what happens if configuration file is corrupted/contains 
error. We must preserve the exception



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