#ignite-738: Remove tests on include backups.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f6c9533b Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f6c9533b Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f6c9533b Branch: refs/heads/ignite-gg-9613 Commit: f6c9533be7c172dcdcd6188736a9cc11afd316cc Parents: 806f51d Author: ivasilinets <ivasilin...@gridgain.com> Authored: Mon Apr 13 19:27:13 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Mon Apr 13 19:27:13 2015 +0300 ---------------------------------------------------------------------- ...GridCachePartitionedFieldsQuerySelfTest.java | 49 -------------------- ...cheReduceFieldsQueryPartitionedSelfTest.java | 17 ------- 2 files changed, 66 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6c9533b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java index 19b2d5a..f48abb4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java @@ -63,53 +63,4 @@ public class GridCachePartitionedFieldsQuerySelfTest extends GridCacheAbstractFi return cc; } - - /** - * @throws Exception If failed. - */ - public void testIncludeBackups() throws Exception { - CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).internalCache(null).queries().createSqlFieldsQuery( - "select _KEY, name, age from Person"); - - qry.includeBackups(true); - - CacheQueryFuture<List<?>> fut = qry.execute(); - - List<List<?>> res = new ArrayList<>(fut.get()); - - assertNotNull("Result", res); - assertEquals("Result", res.size(), 6); - - Collections.sort(res, new Comparator<List<?>>() { - @Override public int compare(List<?> row1, List<?> row2) { - return ((Integer)row1.get(2)).compareTo((Integer)row2.get(2)); - } - }); - - int cnt = 0; - - for (List<?> row : res) { - assertEquals("Row size", 3, row.size()); - - if (cnt == 0 || cnt == 1) { - assertEquals("Key", new AffinityKey<>("p1", "o1"), row.get(0)); - assertEquals("Name", "John White", row.get(1)); - assertEquals("Age", 25, row.get(2)); - } - else if (cnt == 2 || cnt == 3) { - assertEquals("Key", new AffinityKey<>("p2", "o1"), row.get(0)); - assertEquals("Name", "Joe Black", row.get(1)); - assertEquals("Age", 35, row.get(2)); - } - else if (cnt == 4 || cnt == 5) { - assertEquals("Key", new AffinityKey<>("p3", "o2"), row.get(0)); - assertEquals("Name", "Mike Green", row.get(1)); - assertEquals("Age", 40, row.get(2)); - } - - cnt++; - } - - assertEquals("Result count", 6, cnt); - } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6c9533b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java index a5aee10..de5093f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java @@ -39,21 +39,4 @@ public class GridCacheReduceFieldsQueryPartitionedSelfTest extends GridCacheAbst @Override protected int gridCount() { return 3; } - - /** - * @throws Exception If failed. - */ - public void testIncludeBackups() throws Exception { - CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery("select age from Person"); - - qry.includeBackups(true); - - int sum = 0; - - for (IgniteBiTuple<Integer, Integer> tuple : qry.execute(new AverageRemoteReducer()).get()) - sum += tuple.get1(); - - // One backup, so sum is two times greater - assertEquals("Sum", 200, sum); - } }