zk

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

Branch: refs/heads/ignite-zk-ce
Commit: 1fb53f38d4ca5fbd42f9e036be2ddeecc4b38db6
Parents: 9e4f2c20c
Author: sboikov <sboi...@gridgain.com>
Authored: Mon Dec 18 18:15:12 2017 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Mon Dec 18 18:15:12 2017 +0300

----------------------------------------------------------------------
 .../ZookeeperDiscoverySpiBasicTest.java         | 58 ++++++++++----------
 1 file changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1fb53f38/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java
index a29f478..58098b9 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java
@@ -1924,14 +1924,14 @@ public class ZookeeperDiscoverySpiBasicTest extends 
GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testCommunicationErrorResolve_KillNode_1() throws Exception {
-        communicationErrorResolve_KillNodes(2, Collections.singletonList(2L));
+        communicationErrorResolve_KillNodes(2, Collections.singleton(2L));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCommunicationErrorResolve_KillNode_2() throws Exception {
-        communicationErrorResolve_KillNodes(3, Collections.singletonList(2L));
+        communicationErrorResolve_KillNodes(3, Collections.singleton(2L));
     }
 
     /**
@@ -1942,6 +1942,34 @@ public class ZookeeperDiscoverySpiBasicTest extends 
GridCommonAbstractTest {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testCommunicationErrorResolve_KillCoordinator_1() throws 
Exception {
+        communicationErrorResolve_KillNodes(2, Collections.singleton(1L));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testCommunicationErrorResolve_KillCoordinator_2() throws 
Exception {
+        communicationErrorResolve_KillNodes(3, Collections.singleton(1L));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testCommunicationErrorResolve_KillCoordinator_3() throws 
Exception {
+        communicationErrorResolve_KillNodes(10, Arrays.asList(1L, 4L, 6L));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testCommunicationErrorResolve_KillCoordinator_4() throws 
Exception {
+        communicationErrorResolve_KillNodes(10, Arrays.asList(1L, 2L, 3L));
+    }
+
+    /**
      * @param startNodes Number of nodes to start.
      * @param killNodes Nodes to kill by resolve process.
      * @throws Exception If failed.
@@ -1988,32 +2016,6 @@ public class ZookeeperDiscoverySpiBasicTest extends 
GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    public void testCommunicationErrorResolve_KillCoordinator() throws 
Exception {
-        // Kill coordinator.
-        testCommSpi = true;
-
-        commProblemRslvr = new 
TestNodeKillCommunicationProblemResolver(Collections.singleton(1L));
-
-        startGrids(3);
-
-        ZkTestCommunicationSpi commSpi = 
ZkTestCommunicationSpi.forNode(ignite(2));
-
-        commSpi.checkRes = new BitSet(3);
-
-        ZookeeperDiscoverySpi spi = spi(ignite(1));
-
-        spi.onCommunicationConnectionError(ignite(0).cluster().localNode(), 
new Exception("test"));
-
-        waitForTopology(2);
-
-        startGrid(10);
-
-        waitForTopology(3);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testConnectionCheck() throws Exception {
        final int NODES = 5;
 

Reply via email to