Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-676 [created] c82a7368d


# ignite-676: comment tests


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

Branch: refs/heads/ignite-676
Commit: c82a7368dc71b2e06f05e26a7a726d614f7dcd06
Parents: 54f9492
Author: Artem Shutak <ashu...@gridgain.com>
Authored: Tue May 5 17:24:53 2015 +0300
Committer: Artem Shutak <ashu...@gridgain.com>
Committed: Tue May 5 17:24:53 2015 +0300

----------------------------------------------------------------------
 ...gniteProjectionStartStopRestartSelfTest.java | 1437 +++++++++---------
 .../IgniteStartStopRestartTestSuite.java        |    2 +-
 2 files changed, 719 insertions(+), 720 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c82a7368/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
 
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
index 3618c2c..ebb6e97 100644
--- 
a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
+++ 
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
@@ -28,7 +28,6 @@ import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
-import java.nio.file.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -209,724 +208,724 @@ public class IgniteProjectionStartStopRestartSelfTest 
extends GridCommonAbstract
         assert ignite.cluster().nodes().size() == 1;
     }
 
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartThreeNodes() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, DFLT_TIMEOUT, 1);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartThreeNodesAndDoEmptyCall() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        res = startNodes(ignite.cluster(),
-            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-            null, false, 0, 16);
-
-        assert res.isEmpty();
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartThreeNodesAndTryToStartOneNode() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        res = startNodes(ignite.cluster(),
-            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-            null, false, 0, 16);
-
-        assert res.isEmpty();
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartFiveNodesInTwoCalls() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(2);
-
-        res = startNodes(ignite.cluster(),
-            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 5, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-            null, false, 0, 16);
-
-        assert res.size() == 2;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 5;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 5;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartFiveWithTwoSpecs() throws Exception {
-        joinedLatch = new CountDownLatch(5);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                F.asList(map(HOST, SSH_UNAME, pwd, key, 2, U.getIgniteHome(), 
CFG_NO_ATTR, null),
-                    map(HOST, SSH_UNAME, pwd, key, 3, U.getIgniteHome(), 
CFG_NO_ATTR, null)),
-                null, false, 0, 16);
-
-        assert res.size() == 5;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 5;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 5;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartThreeNodesAndRestart() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 3;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(3);
-        leftLatch = new CountDownLatch(3);
-
-        res = startNodes(ignite.cluster(),
-            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-            null, true, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 6;
-        assert leftCnt.get() == 3;
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCustomScript() throws Exception {
-        joinedLatch = new CountDownLatch(1);
-
-        String script = U.isWindows() ? CUSTOM_SCRIPT_WIN : 
CUSTOM_SCRIPT_LINUX;
-
-        script = 
Paths.get(U.getIgniteHome()).relativize(U.resolveIgnitePath(script).toPath()).toString();
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1, 
U.getIgniteHome(), null, script),
-                null, false, 0, 16);
-
-        assert res.size() == 1;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert joinedCnt.get() == 1;
-        assert leftCnt.get() == 0;
-
-        assert ignite.cluster().nodes().size() == 1;
-
-        assert 
CUSTOM_CFG_ATTR_VAL.equals(F.first(ignite.cluster().nodes()).<String>attribute(CUSTOM_CFG_ATTR_KEY));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStopNodes() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, null, 3, 
U.getIgniteHome(), CFG_NO_ATTR,
-                null), null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        leftLatch = new CountDownLatch(3);
-
-        ignite.cluster().stopNodes();
-
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().isEmpty();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStopNodesFiltered() throws Exception {
-        joinedLatch = new CountDownLatch(2);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2, 
U.getIgniteHome(), CFG_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 2;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        joinedLatch = new CountDownLatch(1);
-
-        res = startNodes(ignite.cluster(),
-            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-            null, false, 0, 16);
-
-        assert res.size() == 1;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        leftLatch = new CountDownLatch(2);
-
-        Collection<UUID> ids = 
F.transform(ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY, 
CUSTOM_CFG_ATTR_VAL).nodes(),
-            new IgniteClosure<ClusterNode, UUID>() {
-            @Override public UUID apply(ClusterNode node) {
-                return node.id();
-            }
-        });
-
-        ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY, 
CUSTOM_CFG_ATTR_VAL).nodes();
-
-        ignite.cluster().stopNodes(ids);
-
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 1;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStopNodeById() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        leftLatch = new CountDownLatch(1);
-
-        
ignite.cluster().stopNodes(Collections.singleton(F.first(ignite.cluster().forRemotes().nodes()).id()));
-
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 2;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStopNodesByIds() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        leftLatch = new CountDownLatch(2);
-
-        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
-
-        Collection<UUID> ids = new HashSet<>();
-
-        ids.add(it.next().id());
-        ids.add(it.next().id());
-
-        ignite.cluster().stopNodes(ids);
-
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 1;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStopNodesByIdsC() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        leftLatch = new CountDownLatch(2);
-
-        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
-
-        ignite.cluster().stopNodes(F.asList(it.next().id(), it.next().id()));
-
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 1;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartNodes() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(3);
-        leftLatch = new CountDownLatch(3);
-
-        ignite.cluster().restartNodes();
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartNodesFiltered() throws Exception {
-        joinedLatch = new CountDownLatch(2);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2, 
U.getIgniteHome(), CFG_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 2;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        joinedLatch = new CountDownLatch(1);
-
-        res = startNodes(ignite.cluster(),
-            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-            null, false, 0, 16);
-
-        assert res.size() == 1;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(2);
-        leftLatch = new CountDownLatch(2);
-
-        X.println("Restarting nodes with " + CUSTOM_CFG_ATTR_KEY);
-
-        Collection<UUID> ids = 
F.transform(ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY, 
CUSTOM_CFG_ATTR_VAL).nodes(),
-            new IgniteClosure<ClusterNode, UUID>() {
-                @Override public UUID apply(ClusterNode node) {
-                    return node.id();
-                }
-            }
-        );
-
-        ignite.cluster().restartNodes(ids);
-
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartNodeById() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(1);
-        leftLatch = new CountDownLatch(1);
-
-        
ignite.cluster().restartNodes(Collections.singleton(F.first(ignite.cluster().forRemotes().nodes()).id()));
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartNodesByIds() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(2);
-        leftLatch = new CountDownLatch(2);
-
-        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
-
-        ignite.cluster().restartNodes(F.asList(it.next().id(), 
it.next().id()));
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartNodesByIdsC() throws Exception {
-        joinedLatch = new CountDownLatch(3);
-
-        Collection<ClusterStartNodeResult> res =
-            startNodes(ignite.cluster(),
-                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
-                null, false, 0, 16);
-
-        assert res.size() == 3;
-
-        F.forEach(res, new CI1<ClusterStartNodeResult>() {
-            @Override public void apply(ClusterStartNodeResult t) {
-                assert t.getHostName().equals(HOST);
-
-                if (!t.isSuccess())
-                    throw new IgniteException(t.getError());
-            }
-        });
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-
-        joinedLatch = new CountDownLatch(2);
-        leftLatch = new CountDownLatch(2);
-
-        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
-
-        ignite.cluster().restartNodes(F.asList(it.next().id(), 
it.next().id()));
-
-        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-
-        assert ignite.cluster().nodes().size() == 3;
-    }
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStartThreeNodes() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, DFLT_TIMEOUT, 1);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStartThreeNodesAndDoEmptyCall() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        res = startNodes(ignite.cluster(),
+//            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//            null, false, 0, 16);
+//
+//        assert res.isEmpty();
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStartThreeNodesAndTryToStartOneNode() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        res = startNodes(ignite.cluster(),
+//            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//            null, false, 0, 16);
+//
+//        assert res.isEmpty();
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStartFiveNodesInTwoCalls() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(2);
+//
+//        res = startNodes(ignite.cluster(),
+//            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 5, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//            null, false, 0, 16);
+//
+//        assert res.size() == 2;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 5;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 5;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStartFiveWithTwoSpecs() throws Exception {
+//        joinedLatch = new CountDownLatch(5);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                F.asList(map(HOST, SSH_UNAME, pwd, key, 2, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                    map(HOST, SSH_UNAME, pwd, key, 3, U.getIgniteHome(), 
CFG_NO_ATTR, null)),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 5;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 5;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 5;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStartThreeNodesAndRestart() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 3;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(3);
+//        leftLatch = new CountDownLatch(3);
+//
+//        res = startNodes(ignite.cluster(),
+//            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//            null, true, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 6;
+//        assert leftCnt.get() == 3;
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testCustomScript() throws Exception {
+//        joinedLatch = new CountDownLatch(1);
+//
+//        String script = U.isWindows() ? CUSTOM_SCRIPT_WIN : 
CUSTOM_SCRIPT_LINUX;
+//
+//        script = 
Paths.get(U.getIgniteHome()).relativize(U.resolveIgnitePath(script).toPath()).toString();
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1, 
U.getIgniteHome(), null, script),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 1;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert joinedCnt.get() == 1;
+//        assert leftCnt.get() == 0;
+//
+//        assert ignite.cluster().nodes().size() == 1;
+//
+//        assert 
CUSTOM_CFG_ATTR_VAL.equals(F.first(ignite.cluster().nodes()).<String>attribute(CUSTOM_CFG_ATTR_KEY));
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStopNodes() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, null, 3, 
U.getIgniteHome(), CFG_NO_ATTR,
+//                null), null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        leftLatch = new CountDownLatch(3);
+//
+//        ignite.cluster().stopNodes();
+//
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().isEmpty();
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStopNodesFiltered() throws Exception {
+//        joinedLatch = new CountDownLatch(2);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2, 
U.getIgniteHome(), CFG_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 2;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        joinedLatch = new CountDownLatch(1);
+//
+//        res = startNodes(ignite.cluster(),
+//            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//            null, false, 0, 16);
+//
+//        assert res.size() == 1;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        leftLatch = new CountDownLatch(2);
+//
+//        Collection<UUID> ids = 
F.transform(ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY, 
CUSTOM_CFG_ATTR_VAL).nodes(),
+//            new IgniteClosure<ClusterNode, UUID>() {
+//            @Override public UUID apply(ClusterNode node) {
+//                return node.id();
+//            }
+//        });
+//
+//        ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY, 
CUSTOM_CFG_ATTR_VAL).nodes();
+//
+//        ignite.cluster().stopNodes(ids);
+//
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 1;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStopNodeById() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        leftLatch = new CountDownLatch(1);
+//
+//        
ignite.cluster().stopNodes(Collections.singleton(F.first(ignite.cluster().forRemotes().nodes()).id()));
+//
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 2;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStopNodesByIds() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        leftLatch = new CountDownLatch(2);
+//
+//        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+//
+//        Collection<UUID> ids = new HashSet<>();
+//
+//        ids.add(it.next().id());
+//        ids.add(it.next().id());
+//
+//        ignite.cluster().stopNodes(ids);
+//
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 1;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testStopNodesByIdsC() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        leftLatch = new CountDownLatch(2);
+//
+//        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+//
+//        ignite.cluster().stopNodes(F.asList(it.next().id(), it.next().id()));
+//
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 1;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testRestartNodes() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(3);
+//        leftLatch = new CountDownLatch(3);
+//
+//        ignite.cluster().restartNodes();
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testRestartNodesFiltered() throws Exception {
+//        joinedLatch = new CountDownLatch(2);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2, 
U.getIgniteHome(), CFG_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 2;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        joinedLatch = new CountDownLatch(1);
+//
+//        res = startNodes(ignite.cluster(),
+//            maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//            null, false, 0, 16);
+//
+//        assert res.size() == 1;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(2);
+//        leftLatch = new CountDownLatch(2);
+//
+//        X.println("Restarting nodes with " + CUSTOM_CFG_ATTR_KEY);
+//
+//        Collection<UUID> ids = 
F.transform(ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY, 
CUSTOM_CFG_ATTR_VAL).nodes(),
+//            new IgniteClosure<ClusterNode, UUID>() {
+//                @Override public UUID apply(ClusterNode node) {
+//                    return node.id();
+//                }
+//            }
+//        );
+//
+//        ignite.cluster().restartNodes(ids);
+//
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testRestartNodeById() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(1);
+//        leftLatch = new CountDownLatch(1);
+//
+//        
ignite.cluster().restartNodes(Collections.singleton(F.first(ignite.cluster().forRemotes().nodes()).id()));
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testRestartNodesByIds() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(2);
+//        leftLatch = new CountDownLatch(2);
+//
+//        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+//
+//        ignite.cluster().restartNodes(F.asList(it.next().id(), 
it.next().id()));
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testRestartNodesByIdsC() throws Exception {
+//        joinedLatch = new CountDownLatch(3);
+//
+//        Collection<ClusterStartNodeResult> res =
+//            startNodes(ignite.cluster(),
+//                maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, 
U.getIgniteHome(), CFG_NO_ATTR, null),
+//                null, false, 0, 16);
+//
+//        assert res.size() == 3;
+//
+//        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+//            @Override public void apply(ClusterStartNodeResult t) {
+//                assert t.getHostName().equals(HOST);
+//
+//                if (!t.isSuccess())
+//                    throw new IgniteException(t.getError());
+//            }
+//        });
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//
+//        joinedLatch = new CountDownLatch(2);
+//        leftLatch = new CountDownLatch(2);
+//
+//        Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+//
+//        ignite.cluster().restartNodes(F.asList(it.next().id(), 
it.next().id()));
+//
+//        assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//        assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+//
+//        assert ignite.cluster().nodes().size() == 3;
+//    }
 
     /**
      * @param host Hostname.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c82a7368/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
 
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
index 6d09eb2..9115427 100644
--- 
a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
+++ 
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
@@ -30,7 +30,7 @@ public class IgniteStartStopRestartTestSuite {
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite("Start Nodes Test Suite");
 
-        suite.addTestSuite(IgniteNodeStartUtilsSelfTest.class);
+//        suite.addTestSuite(IgniteNodeStartUtilsSelfTest.class);
 
         suite.addTestSuite(IgniteProjectionStartStopRestartSelfTest.class);
 

Reply via email to