You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2017/04/26 13:25:27 UTC
[16/50] [abbrv] ignite git commit: Fixed failures in
IgniteCrosscacheJoinsQueryTest.
Fixed failures in IgniteCrosscacheJoinsQueryTest.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/645581ee
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/645581ee
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/645581ee
Branch: refs/heads/master
Commit: 645581ee7b76ed40800b47049fa4aea7e4d5605e
Parents: 8d0da14
Author: devozerov <vo...@gridgain.com>
Authored: Tue Apr 25 11:06:09 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Apr 25 11:06:09 2017 +0300
----------------------------------------------------------------------
.../cache/IgniteCrossCachesJoinsQueryTest.java | 77 +-------------------
1 file changed, 3 insertions(+), 74 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/645581ee/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
index cd35788..3ad316f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
@@ -31,8 +31,6 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
-import java.util.concurrent.Callable;
-import javax.cache.CacheException;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheMode;
@@ -53,7 +51,6 @@ import org.apache.ignite.internal.util.typedef.internal.SB;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.GridTestUtils;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -428,6 +425,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
* @param cacheList Caches.
* @throws Exception If failed.
*/
+ @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
private void checkAllCacheCombinations(
boolean idx,
List<List<TestCache>> cacheList) throws Exception {
@@ -552,8 +550,8 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
boolean distributeJoins0 = distributedJoins;
if (replicated(cache)) {
- if (!testNode.configuration().isClientMode())
- assertProperException(cache);
+// if (!testNode.configuration().isClientMode())
+// assertProperException(cache);
boolean all3CachesAreReplicated =
replicated(ignite(0).cache(ACC_CACHE_NAME)) &&
@@ -603,36 +601,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
}
/**
- * @param cache Cache.
- */
- private void assertProperException(final IgniteCache cache) {
- qry = "assertProperException";
-
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- cache.query(new SqlFieldsQuery("select p.name from " +
- "\"" + PERSON_CACHE_NAME + "\".Person p, " +
- "\"" + ACC_CACHE_NAME + "\".Account a " +
- "where p._key = a.personId").setDistributedJoins(true));
-
- return null;
- }
- }, CacheException.class, "Queries using distributed JOINs have to be run on partitioned cache");
-
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- cache.query(new SqlQuery(Person.class,
- "from \"" + PERSON_CACHE_NAME + "\".Person , " +
- "\"" + ACC_CACHE_NAME + "\".Account " +
- "where Person._key = Account.personId")
- .setDistributedJoins(true));
-
- return null;
- }
- }, CacheException.class, "Queries using distributed JOINs have to be run on partitioned cache");
- }
-
- /**
* Organization ids: [0, 9]. Person ids: randoms at [10, 9999]. Accounts ids: randoms at [10000, 999_999]
*
* @return Data.
@@ -1195,45 +1163,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
}
/**
- * @param cache Cache.
- */
- private void checkPersonAccountOrganizationGroupBy(IgniteCache cache) {
- qry = "checkPersonAccountOrganizationGroupBy";
-
- // Max count of accounts at org.
- SqlFieldsQuery q = new SqlFieldsQuery("select max(count(a.id)) " +
- "from " +
- "\"" + PERSON_CACHE_NAME + "\".Person p " +
- "\"" + ORG_CACHE_NAME + "\".Organization o " +
- "\"" + ACC_CACHE_NAME + "\".Account a " +
- "where p.id = a.personId and p.orgStrId = o.strId " +
- "group by org.id " +
- "having o.id = ?");
-
- q.setDistributedJoins(distributedJoins());
-
- for (Map.Entry<Integer, Integer> e : data.accountsPerPerson.entrySet()) {
- Integer personId = e.getKey();
- Integer cnt = e.getValue();
-
- q.setArgs(personId);
-
- List<List<?>> res = cache.query(q).getAll();
-
- String errMsg = "Expected data [personId=" + personId + ", cnt=" + cnt + ", data=" + data + "]";
-
- // Cnt == 0 means that there are no accounts for the person.
- if (cnt > 0) {
- assertEquals(errMsg, 1, res.size());
- assertEquals(errMsg, 1, res.get(0).size());
- assertEquals(errMsg, (long)cnt, res.get(0).get(0));
- }
- else
- assertEquals(errMsg, 0, res.size());
- }
- }
-
- /**
* @throws Exception If failed.
*/
private void checkGroupBy() throws Exception {