ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [01/50] incubator-ignite git commit: ignite-389 Partition scan fallback test fixed
Date Tue, 16 Jun 2015 08:21:11 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-10411 3f20d124d -> 207e2c7b4


ignite-389 Partition scan fallback test fixed


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

Branch: refs/heads/ignite-gg-10411
Commit: 9fca6b5005a6f5ddd16af936c6445748b398ed39
Parents: 7e8f648
Author: agura <agura@gridgain.com>
Authored: Tue Jun 9 14:42:49 2015 +0300
Committer: agura <agura@gridgain.com>
Committed: Tue Jun 9 14:42:49 2015 +0300

----------------------------------------------------------------------
 ...CacheScanPartitionQueryFallbackSelfTest.java | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fca6b50/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
index dfa7296..b7f5fa8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
@@ -31,6 +31,8 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.communication.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import java.util.*;
@@ -47,6 +49,9 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
     /** Keys count. */
     private static final int KEYS_CNT = 5000;
 
+    /** Ip finder. */
+    private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
     /** Backups. */
     private int backups;
 
@@ -75,6 +80,13 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
+        cfg.setClientMode(clientMode);
+
+        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+        discoSpi.setIpFinder(IP_FINDER);
+        discoSpi.setForceServerMode(true);
+        cfg.setDiscoverySpi(discoSpi);
+
         cfg.setCommunicationSpi(commSpiFactory.create());
 
         CacheConfiguration ccfg = defaultCacheConfiguration();
@@ -85,8 +97,6 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
 
         cfg.setCacheConfiguration(ccfg);
 
-        cfg.setClientMode(clientMode);
-
         return cfg;
     }
 
@@ -183,6 +193,7 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
 
                 if (!test.get()) {
                     candidates.addAll(localPartitions(ignite1));
+
                     candidates.retainAll(localPartitions(ignite2));
                 }
 
@@ -195,8 +206,9 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
                             awaitPartitionMapExchange();
 
                             if (!test.get()) {
-                                Set<Integer> parts = localPartitions(ignite1);
-                                candidates.removeAll(parts);
+                                candidates.removeAll(localPartitions(ignite1));
+
+                                F.retain(candidates, false, localPartitions(ignite2));
                             }
 
                             latch.countDown();


Mime
View raw message