ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/2] incubator-ignite git commit: # ignite-1006: review.
Date Fri, 26 Jun 2015 11:06:32 GMT
# ignite-1006: review.


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

Branch: refs/heads/ignite-1006-review
Commit: 9cd3aa46a475d2f864b0bae7b8e03f2b378d9416
Parents: 5d9bb16
Author: ashutak <ashutak@gridgain.com>
Authored: Fri Jun 26 14:05:59 2015 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Fri Jun 26 14:05:59 2015 +0300

----------------------------------------------------------------------
 .../internal/ClusterGroupHostsSelfTest.java     | 22 +++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cd3aa46/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
index c1bae97..297a590 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
@@ -36,19 +36,21 @@ import java.util.*;
 @GridCommonTest(group = "Kernal Self")
 public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
     /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
-        Collection<String> hostNames = null;
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        startGrid();
+    }
 
-        if ("forHostTest".equals(gridName))
-            hostNames = Arrays.asList("h_1", "h_2", "h_3");
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        Collection<String> hostNames = Arrays.asList("h_1", "h_2", "h_3");
 
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        if (hostNames != null) {
-            TcpDiscoverySpi disco = (TcpDiscoverySpi)cfg.getDiscoverySpi();
+        TcpDiscoverySpi disco = (TcpDiscoverySpi)cfg.getDiscoverySpi();
 
-            cfg.setDiscoverySpi(new CustomHostsTcpDiscoverySpi(hostNames).setIpFinder(disco.getIpFinder()));
-        }
+        cfg.setDiscoverySpi(new CustomHostsTcpDiscoverySpi(hostNames).setIpFinder(disco.getIpFinder()));
 
         return cfg;
     }
@@ -57,7 +59,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testForHosts() throws Exception {
-        Ignite ignite = startGrid("forHostTest");
+        Ignite ignite = grid();
 
         assertEquals(1, ignite.cluster().forHost("h_1").nodes().size());
         assertEquals(1, ignite.cluster().forHost("h_1", "h_3").nodes().size());
@@ -83,7 +85,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testHostNames() throws Exception {
-        Ignite ignite = startGrid("forHostTest");
+        Ignite ignite = grid();
 
         Collection<String> locNodeHosts = ignite.cluster().localNode().hostNames();
         Collection<String> clusterHosts = ignite.cluster().hostNames();


Mime
View raw message