ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/4] ignite git commit: 1093
Date Tue, 03 Nov 2015 17:27:21 GMT
1093


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

Branch: refs/heads/ignite-1093-3
Commit: 7cab53427809a3896a83a056614a1bc710944f22
Parents: c2a6787
Author: Anton Vinogradov <av@apache.org>
Authored: Tue Nov 3 18:41:15 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Tue Nov 3 18:41:15 2015 +0300

----------------------------------------------------------------------
 .../GridCacheRebalancingSyncSelfTest.java          | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7cab5342/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
index 6a7f701..4f96045 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.distributed.rebalancing;
 
 import java.util.Map;
+import java.util.Random;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.CacheMode;
@@ -222,12 +223,16 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest
{
 
         Thread t1 = new Thread() {
             @Override public void run() {
+                Random rdm = new Random();
+
                 while (!concurrentStartFinished) {
-                    for (int i = 0; i < 0 + TEST_SIZE; i++) {
+                    for (int i = 0; i < TEST_SIZE; i++) {
                         if (i % (TEST_SIZE / 10) == 0)
                             log.info("Prepared " + i * 100 / (TEST_SIZE) + "% entries ("
+ TEST_SIZE + ").");
 
-                        ignite.cache(CACHE_NAME_DHT_PARTITIONED).put(i, i + CACHE_NAME_DHT_PARTITIONED.hashCode()
+ 0);
+                        int ii = rdm.nextInt(TEST_SIZE);
+
+                        ignite.cache(CACHE_NAME_DHT_PARTITIONED).put(ii, ii + CACHE_NAME_DHT_PARTITIONED.hashCode());
                     }
                 }
             }
@@ -250,8 +255,14 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest
{
         t2.start();
 
         startGrid(2);
+        startGrid(3);
+
+        stopGrid(2);
 
-        waitForRebalancing(2, 3);
+        startGrid(4);
+
+        waitForRebalancing(3, 6);
+        waitForRebalancing(4, 6);
 
         concurrentStartFinished = true;
 


Mime
View raw message