#ignite-738: Remove testReduceQuery from 
GridCacheReduceQueryMultithreadedSelfTest.


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

Branch: refs/heads/ignite-485
Commit: b68aa1c8792693f11386656f1d5e3ab174460556
Parents: 50dd6e4
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Mon Apr 13 17:13:19 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Mon Apr 13 17:13:19 2015 +0300

----------------------------------------------------------------------
 ...idCacheReduceQueryMultithreadedSelfTest.java | 79 --------------------
 1 file changed, 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b68aa1c8/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index d2a626a..4be2581 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -73,83 +73,4 @@ public class GridCacheReduceQueryMultithreadedSelfTest 
extends GridCacheAbstract
 
         return cfg;
     }
-
-    /**
-     * @throws Exception In case of error.
-     */
-    public void testReduceQuery() throws Exception {
-        final int keyCnt = 5000;
-        final int logFreq = 500;
-
-        final GridCacheAdapter<String, Integer> c = internalCache(jcache());
-
-        final CountDownLatch startLatch = new CountDownLatch(1);
-
-        IgniteInternalFuture<?> fut1 = multithreadedAsync(new Callable() {
-            @Override public Object call() throws Exception {
-                for (int i = 1; i < keyCnt; i++) {
-                    c.getAndPut(String.valueOf(i), i);
-
-                    startLatch.countDown();
-
-                    if (i % logFreq == 0)
-                        info("Stored entries: " + i);
-                }
-
-                return null;
-            }
-        }, 1);
-
-        // Create query.
-        final CacheQuery<Map.Entry<String, Integer>> sumQry =
-            c.queries().createSqlQuery(Integer.class, "_val > 
0").timeout(TEST_TIMEOUT);
-
-        final R1<Map.Entry<String, Integer>, Integer> rmtRdc = new 
R1<Map.Entry<String, Integer>, Integer>() {
-            /** */
-            private AtomicInteger sum = new AtomicInteger();
-
-            @Override public boolean collect(Map.Entry<String, Integer> e) {
-                sum.addAndGet(e.getValue());
-
-                return true;
-            }
-
-            @Override public Integer reduce() {
-                return sum.get();
-            }
-        };
-
-        final AtomicBoolean stop = new AtomicBoolean();
-
-        startLatch.await();
-
-        IgniteInternalFuture<?> fut2 = multithreadedAsync(new Callable() {
-            @Override public Object call() throws Exception {
-                int cnt = 0;
-
-                while (!stop.get()) {
-                    Collection<Integer> res = sumQry.execute(rmtRdc).get();
-
-                    int sum = F.sumInt(res);
-
-                    cnt++;
-
-                    assertTrue(sum > 0);
-
-                    if (cnt % logFreq == 0) {
-                        info("Reduced value: " + sum);
-                        info("Executed queries: " + cnt);
-                    }
-                }
-
-                return null;
-            }
-        }, 1);
-
-        fut1.get();
-
-        stop.set(true);
-
-        fut2.get();
-    }
 }

Reply via email to