ibessonov commented on a change in pull request #56:
URL: https://github.com/apache/ignite-3/pull/56#discussion_r582902884
##########
File path:
modules/configuration-annotation-processor/src/test/java/org/apache/ignite/configuration/sample/UsageTest.java
##########
@@ -35,74 +33,88 @@
* Test creation of configuration and calling configuration API methods.
*/
@Test
- public void test() {
- InitLocal initLocal = new InitLocal().withBaseline(
- new InitBaseline()
- .withNodes(
- new NamedList<>(
- Collections.singletonMap("node1", new
InitNode().withConsistentId("test").withPort(1000))
+ public void test() throws Exception {
+ var registry = new ConfigurationRegistry();
+
+ registry.registerRootKey(LocalConfiguration.KEY);
+
+ registry.registerStorage(new TestConfigurationStorage());
+
+ LocalConfiguration root =
registry.getConfiguration(LocalConfiguration.KEY);
+
+ root.change(local ->
+ local.changeBaseline(baseline ->
+ baseline.changeNodes(nodes ->
+ nodes.create("node1", node ->
+ node.initConsistentId("test").initPort(1000)
)
+ ).changeAutoAdjust(autoAdjust ->
+ autoAdjust.changeEnabled(true).changeTimeout(100_000L)
)
- .withAutoAdjust(new
InitAutoAdjust().withEnabled(true).withTimeout(100000L))
- );
+ )
+ ).get();
Review comment:
I don't know) In production code - probably not, in tests - sure we can
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]