You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/09/30 14:49:10 UTC

[3/8] ignite git commit: Test fix

Test fix


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

Branch: refs/heads/ignite-1534
Commit: 1282f8b1ddc248e562ecb937bce84acabb8198f7
Parents: 273f291
Author: Anton Vinogradov <av...@apache.org>
Authored: Wed Sep 30 15:16:31 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Wed Sep 30 15:16:31 2015 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheP2pUnmarshallingErrorTest.java     |  7 +++++++
 .../IgniteCacheP2pUnmarshallingRebalanceErrorTest.java  | 12 ++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1282f8b1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
index b62cc48..1b2b84d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
+import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.util.typedef.X;
@@ -76,6 +77,12 @@ public class IgniteCacheP2pUnmarshallingErrorTest extends IgniteCacheAbstractTes
             cfg.setCacheConfiguration();
         }
 
+        if (getTestGridName(10).equals(gridName)) {
+
+            CacheConfiguration cc = cfg.getCacheConfiguration()[0];
+            cc.setRebalanceDelay(-1);
+        }
+
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1282f8b1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
index 9faeac8..73388fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
@@ -52,20 +52,20 @@ public class IgniteCacheP2pUnmarshallingRebalanceErrorTest extends IgniteCacheP2
 
         readCnt.set(Integer.MAX_VALUE);
 
-        for (int i = 0; i <= 1000; i++)
+        for (int i = 0; i <= 100; i++)
             jcache(0).put(new TestKey(String.valueOf(++key)), "");
 
-        startGrid(3);
+        startGrid(10); //custom rebalanceDelay set at cfg.
 
-        Affinity<Object> aff = affinity(grid(3).cache(null));
+        Affinity<Object> aff = affinity(grid(10).cache(null));
 
-        while (!aff.isPrimary(grid(3).localNode(), new TestKey(String.valueOf(key))))
+        while (!aff.isPrimary(grid(10).localNode(), new TestKey(String.valueOf(key))))
             --key;
 
         readCnt.set(1);
 
         try {
-            jcache(3).get(new TestKey(String.valueOf(key)));
+            jcache(10).get(new TestKey(String.valueOf(key)));
 
             assert false : "p2p marshalling failed, but error response was not sent";
         }
@@ -73,4 +73,4 @@ public class IgniteCacheP2pUnmarshallingRebalanceErrorTest extends IgniteCacheP2
             assert X.hasCause(e, IOException.class);
         }
     }
-}
\ No newline at end of file
+}