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

[GitHub] [ignite-3] sashapolo opened a new pull request, #1570: IGNITE-18601 Copy configuration tree when adding default values

sashapolo opened a new pull request, #1570:
URL: https://github.com/apache/ignite-3/pull/1570

   https://issues.apache.org/jira/browse/IGNITE-18601


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


[GitHub] [ignite-3] ibessonov merged pull request #1570: IGNITE-18601 Copy configuration tree when adding default values

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov merged PR #1570:
URL: https://github.com/apache/ignite-3/pull/1570


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


[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1570: IGNITE-18601 Copy configuration tree when adding default values

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1570:
URL: https://github.com/apache/ignite-3/pull/1570#discussion_r1085520722


##########
modules/configuration/src/test/java/org/apache/ignite/internal/configuration/util/ConfigurationUtilTest.java:
##########
@@ -808,6 +809,26 @@ void testRemoveLastKey() {
         assertEquals(List.of("0"), removeLastKey(List.of("0", "1")));
     }
 
+    /**
+     * Tests that {@link ConfigurationUtil#addDefaults} copies the tree when adding default values.
+     */
+    @Test
+    void testAddDefaultsPurity() {
+        InnerNode parentNode = newNodeInstance(ParentConfigurationSchema.class);
+
+        ParentChange parentChange = (ParentChange) parentNode;
+
+        parentChange.changeElements(elements -> elements.create("name", element -> {}));
+
+        NamedListNode<?> beforeDefaults = find(List.of("elements"), parentNode, true);

Review Comment:
   `find(List.of("elements"), parentNode, true)`
   This is equivalent to `parentChange.elements()`



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