ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [9/9] ignite git commit: IGNITE-8159 Improved test.
Date Mon, 09 Apr 2018 02:19:11 GMT
IGNITE-8159 Improved test.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bf930e7a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bf930e7a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bf930e7a

Branch: refs/heads/ignite-8159
Commit: bf930e7a2f228b40e7e4c7a7cda09cb95ade40fa
Parents: 359b065
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Mon Apr 9 09:18:55 2018 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Mon Apr 9 09:18:55 2018 +0700

----------------------------------------------------------------------
 .../apache/ignite/util/GridCommandHandlerTest.java  | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bf930e7a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index 96a81bf..6a92ee5 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -17,10 +17,11 @@
 
 package org.apache.ignite.util;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.configuration.ConnectorConfiguration;
@@ -223,12 +224,23 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
 
         assertFalse(ignite.cluster().active());
 
-        String consistentIDs =
+        String consistentIDs = getTestIgniteInstanceName(1);
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream(4096);
+        System.setOut(new PrintStream(out));
+
+        assertEquals(EXIT_CODE_UNEXPECTED_ERROR, execute("--baseline", "add", consistentIDs));
+
+        assertTrue(out.toString().contains("Changing BaselineTopology on inactive cluster
is not allowed."));
+
+        consistentIDs =
             getTestIgniteInstanceName(1) + ", " +
             getTestIgniteInstanceName(2) + "," +
             getTestIgniteInstanceName(3);
 
         assertEquals(EXIT_CODE_UNEXPECTED_ERROR, execute("--baseline", "add", consistentIDs));
+
+        assertTrue(out.toString().contains("Node not found for consistent ID: bltTest2"));
     }
 
     /**


Mime
View raw message