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 2017/05/22 15:13:01 UTC

[33/50] [abbrv] ignite git commit: Ignite-5075 pending

Ignite-5075 pending


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

Branch: refs/heads/ignite-5075-pds
Commit: 8b0afe168400e667e53be365097849abe81247a6
Parents: cc3e63d
Author: Igor Seliverstov <gv...@gmail.com>
Authored: Fri May 19 12:43:54 2017 +0300
Committer: Igor Seliverstov <gv...@gmail.com>
Committed: Fri May 19 12:43:54 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheGroupsTest.java | 56 +++++++++++++-------
 1 file changed, 36 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8b0afe16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java
index 674971f..48ce2ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java
@@ -426,13 +426,17 @@ public class IgniteCacheGroupsTest extends GridCommonAbstractTest {
             }
         }
         else {
-            cache1 = ignite(local ? 0 : 1).cache(CACHE1);
-            cache2 = ignite(local ? 0 : 2).cache(CACHE2);
+            // async put ops
+            int ldrs = 4;
+
+            List<Callable<?>> cls = new ArrayList<>(ldrs * 2);
 
-            for (int i = 0; i < keys ; i++) {
-                cache1.put(i, data1[i]);
-                cache2.put(i, data2[i]);
+            for (int i = 0; i < ldrs ; i++) {
+                cls.add(putOperation(local ? 0 : 1, ldrs, i, CACHE1, data1));
+                cls.add(putOperation(local ? 0 : 2, ldrs, i, CACHE2, data2));
             }
+
+            GridTestUtils.runMultiThreaded(cls, "loaders");
         }
 
         ScanQuery<Integer, Integer> qry = new ScanQuery<>();
@@ -499,13 +503,17 @@ public class IgniteCacheGroupsTest extends GridCommonAbstractTest {
             }
         }
         else {
-            cache1 = ignite(1).cache(CACHE1);
-            cache2 = ignite(2).cache(CACHE2);
+            // async put ops
+            int ldrs = 4;
+
+            List<Callable<?>> cls = new ArrayList<>(ldrs * 2);
 
-            for (int i = 0; i < keys ; i++) {
-                cache1.put(i, data1[i]);
-                cache2.put(i, data2[i]);
+            for (int i = 0; i < ldrs ; i++) {
+                cls.add(putOperation(1, ldrs, i, CACHE1, data1));
+                cls.add(putOperation(2, ldrs, i, CACHE2, data2));
             }
+
+            GridTestUtils.runMultiThreaded(cls, "loaders");
         }
 
 
@@ -594,13 +602,17 @@ public class IgniteCacheGroupsTest extends GridCommonAbstractTest {
             }
         }
         else {
-            IgniteCache cache1 = ignite(local ? 0 : 1).cache(CACHE1);
-            IgniteCache cache2 = ignite(local ? 0 : 2).cache(CACHE2);
+            // async put ops
+            int ldrs = 4;
+
+            List<Callable<?>> cls = new ArrayList<>(ldrs * 2);
 
-            for (int i = 0; i < keys ; i++) {
-                cache1.put(i, data1[i]);
-                cache2.put(i, data2[i]);
+            for (int i = 0; i < ldrs ; i++) {
+                cls.add(putOperation(local ? 0 : 1, ldrs, i, CACHE1, data1));
+                cls.add(putOperation(local ? 0 : 2, ldrs, i, CACHE2, data2));
             }
+
+            GridTestUtils.runMultiThreaded(cls, "loaders");
         }
 
 
@@ -674,13 +686,17 @@ public class IgniteCacheGroupsTest extends GridCommonAbstractTest {
             }
         }
         else {
-            IgniteCache cache1 = ignite(local ? 0 : 1).cache(CACHE1);
-            IgniteCache cache2 = ignite(local ? 0 : 2).cache(CACHE2);
+            // async put ops
+            int ldrs = 4;
+
+            List<Callable<?>> cls = new ArrayList<>(ldrs * 2);
 
-            for (int i = 0; i < keys ; i++) {
-                cache1.put(i, data1[i]);
-                cache2.put(i, data2[i]);
+            for (int i = 0; i < ldrs ; i++) {
+                cls.add(putOperation(local ? 0 : 1, ldrs, i, CACHE1, data1));
+                cls.add(putOperation(local ? 0 : 2, ldrs, i, CACHE2, data2));
             }
+
+            GridTestUtils.runMultiThreaded(cls, "loaders");
         }
 
         checkData(local ? 0 : 3, CACHE1, data1);