You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sd...@apache.org on 2022/03/19 10:41:02 UTC
[ignite-3] branch ignite-16684 updated: test
This is an automated email from the ASF dual-hosted git repository.
sdanilov pushed a commit to branch ignite-16684
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/ignite-16684 by this push:
new a1cfe74 test
a1cfe74 is described below
commit a1cfe74fe4a385fe4d8ac670ac3749464003643d
Author: Semyon Danilov <sa...@yandex.ru>
AuthorDate: Sat Mar 19 13:40:52 2022 +0300
test
---
.../internal/runner/app/IgniteCliRunnerTest.java | 38 ++++++++++++++--------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteCliRunnerTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteCliRunnerTest.java
index a600ab0..f3e603e 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteCliRunnerTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteCliRunnerTest.java
@@ -20,9 +20,13 @@ package org.apache.ignite.internal.runner.app;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.nio.file.Path;
+import java.util.List;
+import org.apache.ignite.Ignite;
import org.apache.ignite.app.IgniteCliRunner;
+import org.apache.ignite.internal.ItUtils;
import org.apache.ignite.internal.testframework.WorkDirectory;
import org.apache.ignite.internal.testframework.WorkDirectoryExtension;
+import org.apache.ignite.internal.util.IgniteUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -36,19 +40,25 @@ public class IgniteCliRunnerTest {
public void runnerArgsSmokeTest(@WorkDirectory Path workDir) throws Exception {
Path configPath = Path.of(IgniteCliRunnerTest.class.getResource("/ignite-config.json").toURI());
- assertNotNull(IgniteCliRunner.start(
- new String[]{
- "--config", configPath.toAbsolutePath().toString(),
- "--work-dir", workDir.resolve("node1").toAbsolutePath().toString(),
- "node1"
- }
- ));
-
- assertNotNull(IgniteCliRunner.start(
- new String[]{
- "--work-dir", workDir.resolve("node2").toAbsolutePath().toString(),
- "node2"
- }
- ));
+ Ignite ign1 = IgniteCliRunner.start(
+ new String[]{
+ "--config", configPath.toAbsolutePath().toString(),
+ "--work-dir", workDir.resolve("node1").toAbsolutePath().toString(),
+ "node1"
+ }
+ );
+
+ assertNotNull(ign1);
+
+ Ignite ign2 = IgniteCliRunner.start(
+ new String[]{
+ "--work-dir", workDir.resolve("node2").toAbsolutePath().toString(),
+ "node2"
+ }
+ );
+
+ assertNotNull(ign2);
+
+ IgniteUtils.closeAll(ItUtils.reverse(List.of(ign1, ign2)));
}
}