sashapolo commented on a change in pull request #475:
URL: https://github.com/apache/ignite-3/pull/475#discussion_r760378186
##########
File path:
modules/configuration/src/test/java/org/apache/ignite/internal/configuration/tree/NamedListNodeTest.java
##########
@@ -347,4 +348,36 @@ public void errors() throws Exception {
b.delete("X");
b.delete("Y");
}
+
+ /**
+ * Tests the {@link NamedListNode#update} method.
+ */
+ @Test
+ public void testUpdate() {
+ var list = new NamedListNode<SecondChange>("name", () ->
cgen.instantiateNode(SecondConfigurationSchema.class), null);
+
+ list.create("foo", ch -> ch.changeStr("bar"));
+
+ assertThat(list.get("foo").str(), is(equalTo("bar")));
+
+ list.update("foo", ch -> ch.changeStr("baz"));
+
+ assertThat(list.get("foo").str(), is(equalTo("baz")));
+
+ list.delete("foo");
+
+ // updating a removed key should throw
+ assertThrows(IllegalArgumentException.class, () -> list.update("foo",
ch -> {}));
Review comment:
I've created a ticket: https://issues.apache.org/jira/browse/IGNITE-16042
--
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]