ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ag...@apache.org
Subject [10/16] ignite git commit: Added test for rebalance after restart.
Date Tue, 29 Aug 2017 14:38:24 GMT
Added test for rebalance after restart.

Signed-off-by: Andrey Gura <agura@apache.org>


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

Branch: refs/heads/master
Commit: f8e754980524d15ab9f491381b8af259f1e09bb4
Parents: 2f56406
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Aug 25 16:59:02 2017 +0300
Committer: Andrey Gura <agura@apache.org>
Committed: Tue Aug 29 17:32:04 2017 +0300

----------------------------------------------------------------------
 .../IgnitePdsCacheRebalancingAbstractTest.java  | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f8e75498/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
index 2f43951..91838fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
@@ -498,6 +498,43 @@ public abstract class IgnitePdsCacheRebalancingAbstractTest extends GridCommonAb
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testForceRebalance() throws Exception {
+        final Ignite ig = startGrids(4);
+
+        ig.active(true);
+
+        awaitPartitionMapExchange();
+
+        IgniteCache<Object, Object> c = ig.cache(cacheName);
+
+        Integer val = 0;
+
+        for (int i = 0; i < 5; i++) {
+            Integer key = primaryKey(ignite(3).cache(cacheName));
+
+            c.put(key, val);
+
+            stopGrid(3);
+
+            val++;
+
+            c.put(key, val);
+
+            assertEquals(val, c.get(key));
+
+            startGrid(3);
+
+            awaitPartitionMapExchange();
+
+            Object val0 = ignite(3).cache(cacheName).get(key);
+
+            assertEquals(val, val0);
+        }
+    }
+
+    /**
      * @throws Exception If failed
      */
     public void testPartitionCounterConsistencyOnUnstableTopology() throws Exception {


Mime
View raw message