You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sk...@apache.org on 2021/11/24 20:11:31 UTC

[ignite-3] branch main updated: IGNITE-15729 Fixed problem with starting node from cli. Fixes #470

This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 587776d  IGNITE-15729 Fixed problem with starting node from cli. Fixes #470
587776d is described below

commit 587776d11907649db87d25e66d7704500b0facf5
Author: Mirza Aliev <al...@gmail.com>
AuthorDate: Wed Nov 24 23:10:57 2021 +0300

    IGNITE-15729 Fixed problem with starting node from cli. Fixes #470
    
    Signed-off-by: Slava Koptilin <sl...@gmail.com>
---
 examples/config/ignite-config.json                 |  1 +
 .../internal/runner/app/IgniteCliRunnerTest.java   | 27 +++++++++-------------
 .../integrationTest/resources}/ignite-config.json  |  3 ++-
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/examples/config/ignite-config.json b/examples/config/ignite-config.json
index 4dc13f4..6060004 100644
--- a/examples/config/ignite-config.json
+++ b/examples/config/ignite-config.json
@@ -6,6 +6,7 @@
     },
     "network": {
         "port": 3344,
+        "portRange": 10,
         "nodeFinder": {
             "netClusterNodes": [
                 "localhost:3344"
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 179fd2e..874433f 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
@@ -23,7 +23,6 @@ import java.nio.file.Path;
 import org.apache.ignite.app.IgniteCliRunner;
 import org.apache.ignite.internal.testframework.WorkDirectory;
 import org.apache.ignite.internal.testframework.WorkDirectoryExtension;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 
@@ -32,26 +31,22 @@ import org.junit.jupiter.api.extension.ExtendWith;
  */
 @ExtendWith(WorkDirectoryExtension.class)
 public class IgniteCliRunnerTest {
-    @WorkDirectory
-    private Path workDir;
-
     /** TODO: Replace this test by full integration test on the cli side IGNITE-15097. */
     @Test
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-15729")
-    public void runnerArgsSmokeTest() {
+    public void runnerArgsSmokeTest(@WorkDirectory Path workDir) {
         assertNotNull(IgniteCliRunner.start(
-            new String[] {
-                "--config", workDir.resolve("node1").toAbsolutePath().toString(),
-                "--work-dir", workDir.resolve("node1").toAbsolutePath().toString(),
-                "node1"
-            }
+                new String[]{
+                        "--config", IgniteCliRunnerTest.class.getResource("/ignite-config.json").getPath(),
+                        "--work-dir", workDir.resolve("node1").toAbsolutePath().toString(),
+                        "node1"
+                }
         ));
-
+        
         assertNotNull(IgniteCliRunner.start(
-            new String[] {
-                "--work-dir", workDir.resolve("node2").toAbsolutePath().toString(),
-                "node2"
-            }
+                new String[]{
+                        "--work-dir", workDir.resolve("node2").toAbsolutePath().toString(),
+                        "node2"
+                }
         ));
     }
 }
diff --git a/examples/config/ignite-config.json b/modules/runner/src/integrationTest/resources/ignite-config.json
similarity index 83%
copy from examples/config/ignite-config.json
copy to modules/runner/src/integrationTest/resources/ignite-config.json
index 4dc13f4..6a2ca12 100644
--- a/examples/config/ignite-config.json
+++ b/modules/runner/src/integrationTest/resources/ignite-config.json
@@ -1,11 +1,12 @@
 {
     "node": {
         "metastorageNodes": [
-            "my-first-node"
+            "node1"
         ]
     },
     "network": {
         "port": 3344,
+        "portRange": 10,
         "nodeFinder": {
             "netClusterNodes": [
                 "localhost:3344"