ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [10/50] [abbrv] incubator-ignite git commit: # ignite-51
Date Thu, 05 Mar 2015 08:55:08 GMT
# ignite-51


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

Branch: refs/heads/ignite-user-req
Commit: 43753a8e0d777177dfe0b637df69c75e93ff2e96
Parents: 90172c7
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Mar 4 09:59:16 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Mar 4 09:59:16 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/43753a8e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 8e4c7cd..b90a2f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -3896,19 +3896,30 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         assertFalse(cache.iterator().hasNext());
 
-        final int SIZE = 20000;
+        final int SIZE = 10_000;
 
         Map<String, Integer> entries = new HashMap<>();
 
+        Map<String, Integer> putMap = new HashMap<>();
+
         for (int i = 0; i < SIZE; ++i) {
-            cache.put(Integer.toString(i), i);
+            String key = Integer.toString(i);
+
+            putMap.put(key, i);
+
+            entries.put(key, i);
 
-            entries.put(Integer.toString(i), i);
+            if (putMap.size() == 500) {
+                cache.putAll(putMap);
 
-            if (i > 0 && i % 500 == 0)
-                info("Puts finished: " + i);
+                info("Puts finished: " + (i + 1));
+
+                putMap.clear();
+            }
         }
 
+        cache.putAll(putMap);
+
         checkIteratorHasNext();
 
         checkIteratorCache(entries);


Mime
View raw message