ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [20/24] ignite git commit: ignite-1.5 Use TcpDiscoveryVmIpFinder in test.
Date Mon, 14 Dec 2015 08:38:33 GMT
ignite-1.5 Use TcpDiscoveryVmIpFinder in test.


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

Branch: refs/heads/ignite-843-rc2
Commit: 4d086734833d96b7e2403ce4f17f763a1c75caab
Parents: 47f1ced
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Dec 14 11:27:33 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Dec 14 11:27:33 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/GridFactorySelfTest.java | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4d086734/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
index bc7dc4b..d72b577 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
@@ -57,6 +57,8 @@ import org.apache.ignite.spi.collision.CollisionContext;
 import org.apache.ignite.spi.collision.CollisionExternalListener;
 import org.apache.ignite.spi.collision.CollisionSpi;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.config.GridTestProperties;
 import org.apache.ignite.testframework.http.GridEmbeddedHttpServer;
@@ -83,6 +85,9 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP
 @SuppressWarnings("UnusedDeclaration")
 @GridCommonTest(group = "NonDistributed Kernal Self")
 public class GridFactorySelfTest extends GridCommonAbstractTest {
+    /** IP finder. */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
     /** */
     private static final AtomicInteger cnt = new AtomicInteger();
 
@@ -105,6 +110,15 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
         cnt.set(0);
     }
 
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
+
+        return cfg;
+    }
+
     /**
      * @throws Exception If failed.
      */
@@ -863,9 +877,11 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
     public void testCurrentIgnite() throws Exception {
         final String LEFT = "LEFT";
         final String RIGHT = "RIGHT";
+
         try {
             Ignite iLEFT = startGrid(LEFT);
             Ignite iRIGHT = startGrid(RIGHT);
+
             waitForDiscovery(iLEFT, iRIGHT);
 
             iLEFT.compute(iLEFT.cluster().forRemotes()).run(new IgniteRunnable() {


Mime
View raw message