ignite-437: apply updated api
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/484005a6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/484005a6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/484005a6 Branch: refs/heads/ignite-424 Commit: 484005a641cc98318c2142872ee71ad42fa2242a Parents: 9d3720f Author: Artem Shutak <ashu...@gridgain.com> Authored: Fri Mar 27 12:27:07 2015 +0300 Committer: Artem Shutak <ashu...@gridgain.com> Committed: Fri Mar 27 12:27:07 2015 +0300 ---------------------------------------------------------------------- .../query/h2/sql/IgniteVsH2QueryTest.java | 22 ++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/484005a6/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java index eaacfa0..0506ddf 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java @@ -35,8 +35,6 @@ import java.io.*; import java.sql.*; import java.util.*; -import static org.apache.ignite.cache.CacheDistributionMode.*; - /** * Test to compare query results from h2 database instance and mixed ignite caches (replicated and partitioned) * which have the same data models and data content. @@ -87,15 +85,13 @@ public class IgniteVsH2QueryTest extends GridCommonAbstractTest { cc.setName(name); cc.setCacheMode(mode); cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); - cc.setEvictNearSynchronized(false); cc.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); - cc.setDistributionMode(PARTITIONED_ONLY); if (mode == CacheMode.PARTITIONED) cc.setIndexedTypes( Integer.class, Organization.class, - CacheAffinityKey.class, Person.class, - CacheAffinityKey.class, Purchase.class + AffinityKey.class, Person.class, + AffinityKey.class, Purchase.class ); else if (mode == CacheMode.REPLICATED) cc.setIndexedTypes( @@ -114,9 +110,9 @@ public class IgniteVsH2QueryTest extends GridCommonAbstractTest { Ignite ignite = startGrids(4); - pCache = ignite.jcache("part"); + pCache = ignite.cache("part"); - rCache = ignite.jcache("repl"); + rCache = ignite.cache("repl"); awaitPartitionMapExchange(); @@ -408,7 +404,7 @@ public class IgniteVsH2QueryTest extends GridCommonAbstractTest { List<List<?>> h2Res = executeH2Query(sql, args); - List<List<?>> cacheRes = cache.queryFields(new SqlFieldsQuery(sql).setArgs(args)).getAll(); + List<List<?>> cacheRes = cache.query(new SqlFieldsQuery(sql).setArgs(args)).getAll(); assertRsEquals(h2Res, cacheRes, order); @@ -681,8 +677,8 @@ public class IgniteVsH2QueryTest extends GridCommonAbstractTest { /** * @return Custom affinity key to guarantee that person is always collocated with organization. */ - public CacheAffinityKey<Integer> key() { - return new CacheAffinityKey<>(id, orgId); + public AffinityKey<Integer> key() { + return new AffinityKey<>(id, orgId); } /** {@inheritDoc} */ @@ -824,8 +820,8 @@ public class IgniteVsH2QueryTest extends GridCommonAbstractTest { /** * @return Custom affinity key to guarantee that purchase is always collocated with person. */ - public CacheAffinityKey<Integer> key() { - return new CacheAffinityKey<>(id, personId); + public AffinityKey<Integer> key() { + return new AffinityKey<>(id, personId); } /** {@inheritDoc} */