ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [4/6] incubator-ignite git commit: ignite-709: improved tests
Date Thu, 09 Apr 2015 14:22:59 GMT
ignite-709: improved 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/581d6cf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/581d6cf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/581d6cf9

Branch: refs/heads/ignite-709
Commit: 581d6cf907df15fb8d5e9e3df85e264419723561
Parents: a12a341
Author: Denis Magda <dmagda@gridgain.com>
Authored: Thu Apr 9 17:05:28 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Thu Apr 9 17:05:28 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractSelfTest.java          |  7 +------
 ...ClientModesTcpClientDiscoveryAbstractTest.java | 18 +-----------------
 ...GridCacheClientOnlyTcpClientDiscoveryTest.java |  2 --
 .../GridCacheNearOnlyTcpClientDiscoveryTest.java  |  2 --
 4 files changed, 2 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/581d6cf9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index 2b68f34..3fcee87 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -58,7 +58,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest
{
     protected static final Map<Object, Object> map = new ConcurrentHashMap8<>();
 
     /** VM ip finder for TCP discovery. */
-    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+    protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
     /**
      * @return Grids count to start.
@@ -336,11 +336,6 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * @return {@code TcpDiscoveryIpFinder} that is used and shared among grids.
-     */
-    protected final TcpDiscoveryIpFinder sharedTcpDiscoveryIpFinder() { return ipFinder;
}
-
-    /**
      * @return Default cache instance.
      */
     @SuppressWarnings({"unchecked"})

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/581d6cf9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java
index 3c13bda..ff7d048 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java
@@ -17,19 +17,13 @@
 
 package org.apache.ignite.internal.processors.cache.distributed;
 
-
-import java.net.InetSocketAddress;
-import java.util.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-
 
 /**
  * Tests TcpClientDiscovery SPI in client modes.
  */
 public abstract class GridCacheClientModesTcpClientDiscoveryAbstractTest extends GridCacheClientModesAbstractSelfTest
{
-
     /** {@inheritDoc} */
     @Override protected boolean isClientStartedLast() {
         return true;
@@ -40,18 +34,8 @@ public abstract class GridCacheClientModesTcpClientDiscoveryAbstractTest
extends
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
         if (cfg.isClientMode() != null && cfg.isClientMode()) {
-            TcpDiscoveryVmIpFinder clientIpFinder = new TcpDiscoveryVmIpFinder();
-
-            ArrayList<String> addrList = new ArrayList<>(sharedTcpDiscoveryIpFinder().getRegisteredAddresses().size());
-
-            for (InetSocketAddress addr : sharedTcpDiscoveryIpFinder().getRegisteredAddresses())
{
-                addrList.add(addr.getHostString() + ":" + addr.getPort());
-            }
-
-            clientIpFinder.setAddresses(addrList);
-
             TcpClientDiscoverySpi discoverySpi = new TcpClientDiscoverySpi();
-            discoverySpi.setIpFinder(clientIpFinder);
+            discoverySpi.setIpFinder(ipFinder);
 
             cfg.setDiscoverySpi(discoverySpi);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/581d6cf9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientOnlyTcpClientDiscoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientOnlyTcpClientDiscoveryTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientOnlyTcpClientDiscoveryTest.java
index 9de8c3a..877803a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientOnlyTcpClientDiscoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientOnlyTcpClientDiscoveryTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.configuration.*;
  * Tests TcpClientDiscovery SPI in the client mode only.
  */
 public class GridCacheClientOnlyTcpClientDiscoveryTest extends GridCacheClientModesTcpClientDiscoveryAbstractTest
{
-
     /** {@inheritDoc} */
     @Override protected NearCacheConfiguration nearConfiguration() {
         return null;
@@ -33,5 +32,4 @@ public class GridCacheClientOnlyTcpClientDiscoveryTest extends GridCacheClientMo
     @Override protected boolean clientOnly() {
         return true;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/581d6cf9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNearOnlyTcpClientDiscoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNearOnlyTcpClientDiscoveryTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNearOnlyTcpClientDiscoveryTest.java
index d53358e..ea4b5bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNearOnlyTcpClientDiscoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNearOnlyTcpClientDiscoveryTest.java
@@ -21,10 +21,8 @@ package org.apache.ignite.internal.processors.cache.distributed;
  * Tests TcpClientDiscovery SPI in the client mode with the near cache enabled.
  */
 public class GridCacheNearOnlyTcpClientDiscoveryTest extends GridCacheClientModesTcpClientDiscoveryAbstractTest
{
-
     /** {@inheritDoc} */
     @Override protected boolean clientOnly() {
         return false;
     }
-
 }


Mime
View raw message