Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B51418946 for ; Mon, 13 Jul 2015 07:17:54 +0000 (UTC) Received: (qmail 67180 invoked by uid 500); 13 Jul 2015 07:17:54 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 67148 invoked by uid 500); 13 Jul 2015 07:17:54 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 67139 invoked by uid 99); 13 Jul 2015 07:17:54 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2015 07:17:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 47A96C0F51 for ; Mon, 13 Jul 2015 07:17:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id BBbuNLDzs32R for ; Mon, 13 Jul 2015 07:17:40 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 59AF24C0ED for ; Mon, 13 Jul 2015 07:17:35 +0000 (UTC) Received: (qmail 66287 invoked by uid 99); 13 Jul 2015 07:17:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2015 07:17:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BCD74DFFE6; Mon, 13 Jul 2015 07:17:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 13 Jul 2015 07:17:44 -0000 Message-Id: <8e4f8cc8e91442569e208fc29e289b25@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [11/12] incubator-ignite git commit: # ignite-648: Implemented. # ignite-648: Implemented. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8218fe6f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8218fe6f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8218fe6f Branch: refs/heads/mys-25 Commit: 8218fe6fa42b2daa6816cf862fe1450ad0cf11d3 Parents: ab655ed Author: ashutak Authored: Fri Jul 10 21:40:31 2015 +0300 Committer: ashutak Committed: Fri Jul 10 21:40:31 2015 +0300 ---------------------------------------------------------------------- modules/core/pom.xml | 7 + .../affinity/fair/FairAffinityFunction.java | 5 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 323 ++++++---- .../cache/GridCacheAbstractSelfTest.java | 14 +- ...eAtomicNearOnlyMultiNodeFullApiSelfTest.java | 3 + ...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 +- .../near/GridCacheNearTxMultiNodeSelfTest.java | 10 +- ...achePartitionedMultiNodeFullApiSelfTest.java | 48 +- ...OnlyFairAffinityMultiJvmFullApiSelfTest.java | 31 + ...AtomicClientOnlyMultiJvmFullApiSelfTest.java | 31 + ...tOnlyMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...pyOnReadDisabledMultiJvmFullApiSelfTest.java | 31 + ...omicFairAffinityMultiJvmFullApiSelfTest.java | 31 + .../GridCacheAtomicMultiJvmFullApiSelfTest.java | 30 + ...tomicMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...bledFairAffinityMultiJvmFullApiSelfTest.java | 31 + ...tomicNearEnabledMultiJvmFullApiSelfTest.java | 31 + ...rimaryWriteOrderMultiJvmFullApiSelfTest.java | 31 + ...heAtomicNearOnlyMultiJvmFullApiSelfTest.java | 31 + ...rOnlyMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...cheAtomicOffHeapMultiJvmFullApiSelfTest.java | 31 + ...micOffHeapTieredMultiJvmFullApiSelfTest.java | 36 ++ ...rderFairAffinityMultiJvmFullApiSelfTest.java | 31 + ...rimaryWriteOrderMultiJvmFullApiSelfTest.java | 31 + ...OrderMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...rityOrderOffHeapMultiJvmFullApiSelfTest.java | 31 + ...derOffHeapTieredMultiJvmFullApiSelfTest.java | 36 ++ ...OnlyFairAffinityMultiJvmFullApiSelfTest.java | 31 + ...ridCacheNearOnlyMultiJvmFullApiSelfTest.java | 30 + ...rOnlyMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...pyOnReadDisabledMultiJvmFullApiSelfTest.java | 31 + ...onedFairAffinityMultiJvmFullApiSelfTest.java | 31 + ...CachePartitionedMultiJvmFullApiSelfTest.java | 30 + ...ionedMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...micOffHeapTieredMultiJvmFullApiSelfTest.java | 36 ++ ...bledFairAffinityMultiJvmFullApiSelfTest.java | 31 + ...onedNearDisabledMultiJvmFullApiSelfTest.java | 31 + ...abledMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...rDisabledOffHeapMultiJvmFullApiSelfTest.java | 31 + ...ledOffHeapTieredMultiJvmFullApiSelfTest.java | 36 ++ ...rtitionedOffHeapMultiJvmFullApiSelfTest.java | 31 + ...nedOffHeapTieredMultiJvmFullApiSelfTest.java | 36 ++ ...ReplicatedAtomicMultiJvmFullApiSelfTest.java | 31 + ...rimaryWriteOrderMultiJvmFullApiSelfTest.java | 31 + ...dCacheReplicatedMultiJvmFullApiSelfTest.java | 30 + ...catedMultiJvmP2PDisabledFullApiSelfTest.java | 31 + ...plicatedNearOnlyMultiJvmFullApiSelfTest.java | 37 ++ ...eplicatedOffHeapMultiJvmFullApiSelfTest.java | 31 + ...tedOffHeapTieredMultiJvmFullApiSelfTest.java | 36 ++ .../testframework/junits/GridAbstractTest.java | 380 +++++++++++- .../junits/common/GridCommonAbstractTest.java | 50 +- .../junits/multijvm/AffinityProcessProxy.java | 195 ++++++ .../multijvm/IgniteCacheProcessProxy.java | 602 +++++++++++++++++++ .../multijvm/IgniteClusterProcessProxy.java | 320 ++++++++++ .../multijvm/IgniteEventsProcessProxy.java | 148 +++++ .../junits/multijvm/IgniteNodeRunner.java | 184 ++++++ .../junits/multijvm/IgniteProcessProxy.java | 571 ++++++++++++++++++ ...IgniteCacheFullApiMultiJvmSelfTestSuite.java | 89 +++ parent/pom.xml | 40 ++ pom.xml | 1 - 60 files changed, 4094 insertions(+), 204 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/pom.xml ---------------------------------------------------------------------- diff --git a/modules/core/pom.xml b/modules/core/pom.xml index 6c5af02..5ac49ae 100644 --- a/modules/core/pom.xml +++ b/modules/core/pom.xml @@ -55,6 +55,13 @@ + com.thoughtworks.xstream + xstream + 1.4.8 + test + + + commons-cli commons-cli 1.2 http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java index 0253e62..14a4f53 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java @@ -19,7 +19,7 @@ package org.apache.ignite.cache.affinity.fair; import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cluster.*; -import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; @@ -31,7 +31,8 @@ import java.util.*; * Fair affinity function which tries to ensure that all nodes get equal number of partitions with * minimum amount of reassignments between existing nodes. *

- * Cache affinity can be configured for individual caches via {@link CacheConfiguration#getAffinity()} method. + * Cache affinity can be configured for individual caches via + * {@link CacheConfiguration#setAffinity(AffinityFunction)} method. */ @AffinityCentralizedFunction public class FairAffinityFunction implements AffinityFunction { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 151c249..f8d1ce3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -61,6 +61,7 @@ import static org.apache.ignite.transactions.TransactionState.*; /** * Full API cache test. */ +@SuppressWarnings("TransientFieldInNonSerializableClass") public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest { /** Increment processor for invoke operations. */ public static final EntryProcessor INCR_PROCESSOR = new EntryProcessor() { @@ -105,7 +106,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract }; /** Dflt grid. */ - protected Ignite dfltIgnite; + protected transient Ignite dfltIgnite; /** */ private Map cacheCfgMap; @@ -162,7 +163,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract super.beforeTestsStarted(); for (Map.Entry entry : cacheCfgMap.entrySet()) { - Ignite ignite = IgnitionEx.grid(entry.getKey()); + Ignite ignite = grid(entry.getKey()); for (CacheConfiguration cfg : entry.getValue()) ignite.createCache(cfg); @@ -206,7 +207,10 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract cfg.setCacheConfiguration(); - return IgnitionEx.start(optimize(cfg), ctx); + if (!isRemoteJvm(gridName)) + return IgnitionEx.start(optimize(cfg), ctx); + else + return startRemoteGrid(gridName, optimize(cfg), ctx); } /** {@inheritDoc} */ @@ -251,7 +255,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract int size = 10; - Map map = new HashMap<>(); + final Map map = new HashMap<>(); for (int i = 0; i < size; i++) map.put("key" + i, i); @@ -284,15 +288,19 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract } for (int i = 0; i < gridCount(); i++) { - GridCacheContext ctx = context(i); + executeOnLocalOrRemoteJvm(i, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + GridCacheContext ctx = context(idx); - int sum = 0; + int sum = 0; - for (String key : map.keySet()) - if (ctx.affinity().localNode(key, new AffinityTopologyVersion(ctx.discovery().topologyVersion()))) - sum++; + for (String key : map.keySet()) + if (ctx.affinity().localNode(key, new AffinityTopologyVersion(ctx.discovery().topologyVersion()))) + sum++; - assertEquals("Incorrect key size on cache #" + i, sum, jcache(i).localSize(ALL)); + assertEquals("Incorrect key size on cache #" + idx, sum, jcache(idx).localSize(ALL)); + } + }); } for (int i = 0; i < gridCount(); i++) { @@ -359,6 +367,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testRemoveAllSkipStore() throws Exception { + if (isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1088"); + IgniteCache jcache = jcache(); jcache.putAll(F.asMap("1", 1, "2", 2, "3", 3)); @@ -448,7 +459,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testGetAll() throws Exception { - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; final IgniteCache cache = jcache(); @@ -495,7 +506,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertNull(map2.get("key9999")); // Now do the same checks but within transaction. - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction tx0 = transactions().txStart()) { assert cache.getAll(Collections.emptySet()).isEmpty(); @@ -548,7 +559,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testGetTxNonExistingKey() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart()) { assert jcache().get("key999123") == null; } @@ -626,7 +637,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testPutTx() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { IgniteCache cache = jcache(); try (Transaction tx = transactions().txStart()) { @@ -729,7 +740,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract cache.put("key2", 1); cache.put("key3", 3); - Transaction tx = txEnabled() ? ignite(0).transactions().txStart(concurrency, isolation) : null; + Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, isolation) : null; try { assertEquals("null", cache.invoke("key1", INCR_IGNITE_PROCESSOR)); @@ -783,7 +794,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract cache.put("key2", 1); cache.put("key3", 3); - Transaction tx = txEnabled() ? ignite(0).transactions().txStart(concurrency, isolation) : null; + Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, isolation) : null; try { assertEquals("null", cache.invoke("key1", INCR_PROCESSOR)); @@ -866,7 +877,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract cache.put("key2", 1); cache.put("key3", 3); - if (txEnabled()) { + if (txShouldBeUsed()) { Map> res; try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) { @@ -1022,7 +1033,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract final String key = primaryKeysForCache(cache, 1).get(0); - Transaction tx = txEnabled() ? ignite(0).transactions().txStart(concurrency, READ_COMMITTED) : null; + Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, READ_COMMITTED) : null; try { if (startVal) @@ -1083,7 +1094,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract cache.put("key", 4); - Transaction tx = txEnabled() ? ignite(0).transactions().txStart(concurrency, READ_COMMITTED) : null; + Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, READ_COMMITTED) : null; try { cache.remove("key"); @@ -1154,7 +1165,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract if (!put) cache.put("key", 1); - Transaction tx = txEnabled() ? ignite(0).transactions().txStart(concurrency, isolation) : null; + Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, isolation) : null; try { if (put) @@ -1313,7 +1324,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testPutx() throws Exception { - if (txEnabled()) + if (txShouldBeUsed()) checkPut(true); } @@ -1365,7 +1376,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testPutAsync() throws Exception { - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; IgniteCache cacheAsync = jcache().withAsync(); @@ -1436,7 +1447,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testNullInTx() throws Exception { - if (!txEnabled()) + if (!txShouldBeUsed()) return; final IgniteCache cache = jcache(); @@ -1685,7 +1696,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testGetAndPutIfAbsent() throws Exception { - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; IgniteCache cache = jcache(); @@ -1729,17 +1740,20 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertEquals((Integer)1, cache.getAndPutIfAbsent("key2", 3)); // Check db. - putToStore("key3", 3); + if (!isMultiJvm()) { + putToStore("key3", 3); + + assertEquals((Integer)3, cache.getAndPutIfAbsent("key3", 4)); - assertEquals((Integer)3, cache.getAndPutIfAbsent("key3", 4)); + assertEquals((Integer)3, cache.get("key3")); + } assertEquals((Integer)1, cache.get("key2")); - assertEquals((Integer)3, cache.get("key3")); cache.localEvict(Collections.singleton("key2")); // Same checks inside tx. - tx = txEnabled() ? transactions().txStart() : null; + tx = txShouldBeUsed() ? transactions().txStart() : null; try { assertEquals((Integer)1, cache.getAndPutIfAbsent("key2", 3)); @@ -1759,7 +1773,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testGetAndPutIfAbsentAsync() throws Exception { - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; IgniteCache cache = jcache(); @@ -1798,16 +1812,18 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertEquals((Integer)1, cacheAsync.future().get()); // Check db. - putToStore("key3", 3); + if (!isMultiJvm()) { + putToStore("key3", 3); - cacheAsync.getAndPutIfAbsent("key3", 4); + cacheAsync.getAndPutIfAbsent("key3", 4); - assertEquals((Integer)3, cacheAsync.future().get()); + assertEquals((Integer)3, cacheAsync.future().get()); + } cache.localEvict(Collections.singleton("key2")); // Same checks inside tx. - tx = txEnabled() ? transactions().txStart() : null; + tx = txShouldBeUsed() ? transactions().txStart() : null; try { cacheAsync.getAndPutIfAbsent("key2", 3); @@ -1845,14 +1861,16 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertFalse(cache.putIfAbsent("key2", 3)); // Check db. - putToStore("key3", 3); + if (!isMultiJvm()) { + putToStore("key3", 3); - assertFalse(cache.putIfAbsent("key3", 4)); + assertFalse(cache.putIfAbsent("key3", 4)); + } cache.localEvict(Collections.singleton("key2")); // Same checks inside tx. - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; try { assertFalse(cache.putIfAbsent("key2", 3)); @@ -1872,7 +1890,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testPutxIfAbsentAsync() throws Exception { - if (txEnabled()) + if (txShouldBeUsed()) checkPutxIfAbsentAsync(true); } @@ -1916,11 +1934,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertFalse(cacheAsync.future().get()); // Check db. - putToStore("key3", 3); + if (!isMultiJvm()) { + putToStore("key3", 3); - cacheAsync.putIfAbsent("key3", 4); + cacheAsync.putIfAbsent("key3", 4); - assertFalse(cacheAsync.future().get()); + assertFalse(cacheAsync.future().get()); + } cache.localEvict(Arrays.asList("key2")); @@ -1932,9 +1952,11 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertFalse(cacheAsync.future().get()); - cacheAsync.putIfAbsent("key3", 4); + if (!isMultiJvm()) { + cacheAsync.putIfAbsent("key3", 4); - assertFalse(cacheAsync.future().get()); + assertFalse(cacheAsync.future().get()); + } if (tx != null) tx.commit(); @@ -1945,7 +1967,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract } assertEquals((Integer)1, cache.get("key2")); - assertEquals((Integer)3, cache.get("key3")); + + if (!isMultiJvm()) + assertEquals((Integer)3, cache.get("key3")); } /** @@ -2014,11 +2038,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assert cache.get("key") == 4; - putToStore("key2", 5); + if (!isMultiJvm()) { + putToStore("key2", 5); - info("key2 5 -> 6"); + info("key2 5 -> 6"); - assert cache.replace("key2", 5, 6); + assert cache.replace("key2", 5, 6); + } for (int i = 0; i < gridCount(); i++) { info("Peek key on grid [i=" + i + ", nodeId=" + grid(i).localNode().id() + @@ -2028,11 +2054,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract ", peekVal=" + grid(i).cache(null).localPeek("key2", ONHEAP) + ']'); } - assertEquals((Integer)6, cache.get("key2")); + if (!isMultiJvm()) + assertEquals((Integer)6, cache.get("key2")); cache.localEvict(Collections.singleton("key")); - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; try { assert cache.replace("key", 4, 5); @@ -2070,15 +2097,17 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assert cache.get("key") == 4; - putToStore("key2", 5); + if (!isMultiJvm()) { + putToStore("key2", 5); - assert cache.replace("key2", 6); + assert cache.replace("key2", 6); - assertEquals((Integer)6, cache.get("key2")); + assertEquals((Integer)6, cache.get("key2")); + } cache.localEvict(Collections.singleton("key")); - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; try { assert cache.replace("key", 5); @@ -2144,17 +2173,19 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assert cache.get("key") == 4; - putToStore("key2", 5); + if (!isMultiJvm()) { + putToStore("key2", 5); - cacheAsync.replace("key2", 5, 6); + cacheAsync.replace("key2", 5, 6); - assert cacheAsync.future().get(); + assert cacheAsync.future().get(); - assertEquals((Integer)6, cache.get("key2")); + assertEquals((Integer)6, cache.get("key2")); + } cache.localEvict(Collections.singleton("key")); - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; try { cacheAsync.replace("key", 4, 5); @@ -2204,17 +2235,19 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assert cache.get("key") == 4; - putToStore("key2", 5); + if (!isMultiJvm()) { + putToStore("key2", 5); - cacheAsync.replace("key2", 6); + cacheAsync.replace("key2", 6); - assert cacheAsync.future().get(); + assert cacheAsync.future().get(); - assert cache.get("key2") == 6; + assert cache.get("key2") == 6; + } cache.localEvict(Collections.singleton("key")); - Transaction tx = txEnabled() ? transactions().txStart() : null; + Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; try { cacheAsync.replace("key", 5); @@ -2255,7 +2288,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract */ public void testDeletedEntriesFlag() throws Exception { if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) { - int cnt = 3; + final int cnt = 3; IgniteCache cache = jcache(); @@ -2266,21 +2299,25 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract cache.remove(String.valueOf(i)); for (int g = 0; g < gridCount(); g++) { - for (int i = 0; i < cnt; i++) { - String key = String.valueOf(i); - - GridCacheContext cctx = context(g); - - GridCacheEntryEx entry = cctx.isNear() ? cctx.near().dht().peekEx(key) : - cctx.cache().peekEx(key); - - if (grid(0).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) { - assertNotNull(entry); - assertTrue(entry.deleted()); + executeOnLocalOrRemoteJvm(g, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + for (int i = 0; i < cnt; i++) { + String key = String.valueOf(i); + + GridCacheContext cctx = context(idx); + + GridCacheEntryEx entry = cctx.isNear() ? cctx.near().dht().peekEx(key) : + cctx.cache().peekEx(key); + + if (grid(idx).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(idx).localNode())) { + assertNotNull(entry); + assertTrue(entry.deleted()); + } + else + assertNull(entry); + } } - else - assertNull(entry); - } + }); } } } @@ -2289,6 +2326,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testRemoveLoad() throws Exception { + if (isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1088"); + int cnt = 10; Set keys = new HashSet<>(); @@ -2542,7 +2582,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ public void testRemoveAllDuplicatesTx() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart()) { jcache().removeAll(ImmutableSet.of("key1", "key1", "key1")); @@ -2957,7 +2997,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ private void checkPeekTxRemove(TransactionConcurrency concurrency) throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { Ignite ignite = primaryIgnite("key"); IgniteCache cache = ignite.cache(null); @@ -3065,7 +3105,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testPeekExpiredTx() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { IgniteCache c = jcache(); String key = "1"; @@ -3091,7 +3131,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testTtlTx() throws Exception { - if (txEnabled()) + if (txShouldBeUsed()) checkTtl(true, false); } @@ -3115,6 +3155,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ private void checkTtl(boolean inTx, boolean oldEntry) throws Exception { + if (isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1089"); + if (memoryMode() == OFFHEAP_TIERED) return; @@ -3610,7 +3653,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testOptimisticTxMissingKey() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { // Remove missing key. assertTrue(jcache().remove(UUID.randomUUID().toString())); @@ -3626,7 +3669,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testOptimisticTxMissingKeyNoCommit() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { // Remove missing key. assertTrue(jcache().remove(UUID.randomUUID().toString())); @@ -3670,7 +3713,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ private void checkRemovexInTx(TransactionConcurrency concurrency, TransactionIsolation isolation) throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { final int cnt = 10; CU.inTx(ignite(0), jcache(), concurrency, isolation, new CIX1>() { @@ -3709,7 +3752,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testPessimisticTxMissingKey() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { // Remove missing key. assertFalse(jcache().remove(UUID.randomUUID().toString())); @@ -3725,7 +3768,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testPessimisticTxMissingKeyNoCommit() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { // Remove missing key. assertFalse(jcache().remove(UUID.randomUUID().toString())); @@ -3739,7 +3782,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testPessimisticTxRepeatableRead() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { jcache().put("key", 1); @@ -3752,7 +3795,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testPessimisticTxRepeatableReadOnUpdate() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { jcache().put("key", 1); @@ -3790,7 +3833,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @param keys Expected keys. * @throws Exception If failed. */ - protected void checkSize(Collection keys) throws Exception { + protected void checkSize(final Collection keys) throws Exception { if (memoryMode() == OFFHEAP_TIERED) return; @@ -3798,26 +3841,30 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL)); else { for (int i = 0; i < gridCount(); i++) { - GridCacheContext ctx = context(i); + executeOnLocalOrRemoteJvm(i, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + GridCacheContext ctx = context(idx); - if (ctx.cache().configuration().getMemoryMode() == OFFHEAP_TIERED) - continue; + if (ctx.cache().configuration().getMemoryMode() == OFFHEAP_TIERED) + return; - int size = 0; + int size = 0; - for (String key : keys) { - if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx())) { - GridCacheEntryEx e = - ctx.isNear() ? ctx.near().dht().peekEx(key) : ctx.cache().peekEx(key); + for (String key : keys) { + if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx())) { + GridCacheEntryEx e = + ctx.isNear() ? ctx.near().dht().peekEx(key) : ctx.cache().peekEx(key); - assert e != null : "Entry is null [idx=" + i + ", key=" + key + ", ctx=" + ctx + ']'; - assert !e.deleted() : "Entry is deleted: " + e; + assert e != null : "Entry is null [idx=" + idx + ", key=" + key + ", ctx=" + ctx + ']'; + assert !e.deleted() : "Entry is deleted: " + e; - size++; - } - } + size++; + } + } - assertEquals("Incorrect size on cache #" + i, size, jcache(i).localSize(ALL)); + assertEquals("Incorrect size on cache #" + idx, size, jcache(idx).localSize(ALL)); + } + }); } } } @@ -3826,21 +3873,25 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @param keys Expected keys. * @throws Exception If failed. */ - protected void checkKeySize(Collection keys) throws Exception { + protected void checkKeySize(final Collection keys) throws Exception { if (nearEnabled()) assertEquals("Invalid key size: " + jcache().localSize(ALL), keys.size(), jcache().localSize(ALL)); else { for (int i = 0; i < gridCount(); i++) { - GridCacheContext ctx = context(i); + executeOnLocalOrRemoteJvm(i, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + GridCacheContext ctx = context(idx); - int size = 0; + int size = 0; - for (String key : keys) - if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx())) - size++; + for (String key : keys) + if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx())) + size++; - assertEquals("Incorrect key size on cache #" + i, size, jcache(i).localSize(ALL)); + assertEquals("Incorrect key size on cache #" + idx, size, jcache(idx).localSize(ALL)); + } + }); } } } @@ -3879,7 +3930,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract UUID nodeId = node.id(); for (int i = 0; i < gridCount(); i++) { - if (context(i).localNodeId().equals(nodeId)) + if (grid(i).localNode().id().equals(nodeId)) return ignite(i); } @@ -3899,24 +3950,27 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @param cnt Keys count. * @return Collection of keys for which given cache is primary. */ - protected List primaryKeysForCache(IgniteCache cache, int cnt, int startFrom) { - List found = new ArrayList<>(cnt); + protected List primaryKeysForCache(final IgniteCache cache, final int cnt, final int startFrom) { + return executeOnLocalOrRemoteJvm(cache, new TestCacheCallable>() { + @Override public List call(Ignite ignite, IgniteCache cache) throws Exception { + List found = new ArrayList<>(); - Ignite ignite = cache.unwrap(Ignite.class); - Affinity affinity = ignite.affinity(cache.getName()); + Affinity affinity = ignite.affinity(cache.getName()); - for (int i = startFrom; i < startFrom + 100_000; i++) { - String key = "key" + i; + for (int i = startFrom; i < startFrom + 100_000; i++) { + String key = "key" + i; - if (affinity.isPrimary(ignite.cluster().localNode(), key)) { - found.add(key); + if (affinity.isPrimary(ignite.cluster().localNode(), key)) { + found.add(key); - if (found.size() == cnt) - return found; - } - } + if (found.size() == cnt) + return found; + } + } - throw new IgniteException("Unable to find " + cnt + " keys as primary for cache."); + throw new IgniteException("Unable to find " + cnt + " keys as primary for cache."); + } + }); } /** @@ -4108,13 +4162,16 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract */ private void checkIteratorsCleared() { for (int j = 0; j < gridCount(); j++) { + executeOnLocalOrRemoteJvm(j, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + GridCacheQueryManager queries = context(idx).queries(); - GridCacheQueryManager queries = context(j).queries(); - - Map map = GridTestUtils.getFieldValue(queries, GridCacheQueryManager.class, "qryIters"); + Map map = GridTestUtils.getFieldValue(queries, GridCacheQueryManager.class, "qryIters"); - for (Object obj : map.values()) - assertEquals("Iterators not removed for grid " + j, 0, ((Map) obj).size()); + for (Object obj : map.values()) + assertEquals("Iterators not removed for grid " + idx, 0, ((Map)obj).size()); + } + }); } } @@ -4358,6 +4415,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testWithSkipStore() throws Exception { + if(isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1088"); + IgniteCache cache = grid(0).cache(null); IgniteCache cacheSkipStore = cache.withSkipStore(); @@ -4567,6 +4627,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testWithSkipStoreRemoveAll() throws Exception { + if (isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1088"); + if (atomicityMode() == TRANSACTIONAL || (atomicityMode() == ATOMIC && nearEnabled())) // TODO IGNITE-373. return; @@ -4608,7 +4671,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception If failed. */ public void testWithSkipStoreTx() throws Exception { - if (txEnabled()) { + if (txShouldBeUsed()) { IgniteCache cache = grid(0).cache(null); IgniteCache cacheSkipStore = cache.withSkipStore(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java index 468aec1..4cd208d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java @@ -313,12 +313,20 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest { /** * @return {@code True} if transactions are enabled. + * @see #txShouldBeUsed() */ protected boolean txEnabled() { return true; } /** + * @return {@code True} if transactions should be used. + */ + protected boolean txShouldBeUsed() { + return txEnabled() && !isMultiJvm(); + } + + /** * @return {@code True} if locking is enabled. */ protected boolean lockingEnabled() { @@ -360,7 +368,11 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest { * @param idx Index of grid. * @return Cache context. */ - protected GridCacheContext context(int idx) { + protected GridCacheContext context(final int idx) { + if (isRemoteJvm(idx) && !isRemoteJvm()) + throw new UnsupportedOperationException("Operation can't be done automatically via proxy. " + + "Send task with this logic on remote jvm instead."); + return ((IgniteKernal)grid(idx)).internalCache().context(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java index ac93adb..c592395 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java @@ -114,6 +114,9 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe /** {@inheritDoc} */ @Override public void testEvictExpired() throws Exception { + if (isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1113"); + IgniteCache cache = jcache(); String key = primaryKeysForCache(cache, 1).get(0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java index d40e9e3..f30ea71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java @@ -125,7 +125,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio return F.view(super.affinityNodes(), new P1() { @Override public boolean apply(ClusterNode n) { - return !F.eq(G.ignite(n.id()).name(), grid(nearIdx).name()); + return !F.eq(grid(n).name(), grid(nearIdx).name()); } }); } @@ -211,6 +211,9 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio * @throws Exception If failed. */ private void checkReaderTtl(boolean inTx) throws Exception { + if (isMultiJvm()) + fail("https://issues.apache.org/jira/browse/IGNITE-1089"); + int ttl = 1000; final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(TimeUnit.MILLISECONDS, ttl)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java index ef0ab48..962e80d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java @@ -104,9 +104,9 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest { assert backupNode != otherNode; assert priNode != otherNode; - Ignite priIgnite = G.ignite(priNode.id()); - Ignite backupIgnite = G.ignite(backupNode.id()); - Ignite otherIgnite = G.ignite(otherNode.id()); + final Ignite priIgnite = grid(priNode); + Ignite backupIgnite = grid(backupNode); + Ignite otherIgnite = grid(otherNode); List ignites = F.asList(otherIgnite, priIgnite, backupIgnite); @@ -152,8 +152,8 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest { tx.close(); } - G.stop(priIgnite.name(), true); - G.stop(backupIgnite.name(), true); + stopGrid(priIgnite.name(), true); + stopGrid(backupIgnite.name(), true); Ignite newIgnite = startGrid(GRID_CNT); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java index 30c9e8a..a5e7a31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java @@ -28,7 +28,6 @@ import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; import java.util.*; -import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheMode.*; import static org.apache.ignite.cache.CachePeekMode.*; @@ -135,7 +134,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < gridCount(); i++) info(">>>>> Grid" + i + ": " + grid(i).localNode().id()); - int size = 10; + final int size = 10; IgniteCache chache0 = grid(0).cache(null); @@ -148,16 +147,20 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti } for (int i = 0; i < gridCount(); i++) { - assertEquals(0, context(i).tm().idMapSize()); + executeOnLocalOrRemoteJvm(i, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + assertEquals(0, context(idx).tm().idMapSize()); - IgniteCache cache = grid(i).cache(null); - ClusterNode node = grid(i).localNode(); + IgniteCache cache = grid(idx).cache(null); + ClusterNode node = grid(idx).localNode(); - for (int k = 0; k < size; k++) { - if (affinity(cache).isPrimaryOrBackup(node, k)) - assertEquals("Check failed for node: " + node.id(), k, - cache.localPeek(k, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP)); - } + for (int k = 0; k < size; k++) { + if (affinity(cache).isPrimaryOrBackup(node, k)) + assertEquals("Check failed for node: " + node.id(), k, + cache.localPeek(k, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP)); + } + } + }); } for (int i = 0; i < size; i++) { @@ -179,21 +182,24 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED) return; - final AtomicInteger swapEvts = new AtomicInteger(0); - final AtomicInteger unswapEvts = new AtomicInteger(0); + final IgniteAtomicLong swapEvts = grid(0).atomicLong("swapEvts", 0, true); + + final IgniteAtomicLong unswapEvts = grid(0).atomicLong("unswapEvts", 0, true); for (int i = 0; i < gridCount(); i++) { + final int iCopy = i; + grid(i).events().localListen(new IgnitePredicate() { @Override public boolean apply(Event evt) { info("Received event: " + evt); switch (evt.type()) { case EVT_CACHE_OBJECT_SWAPPED: - swapEvts.incrementAndGet(); + grid(iCopy).atomicLong("swapEvts", 0, false).incrementAndGet(); break; case EVT_CACHE_OBJECT_UNSWAPPED: - unswapEvts.incrementAndGet(); + grid(iCopy).atomicLong("unswapEvts", 0, false).incrementAndGet(); break; } @@ -235,8 +241,13 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti boolean nearEnabled = nearEnabled(c); - if (nearEnabled) - assertTrue(((IgniteKernal)ignite(i)).internalCache().context().isNear()); + if (nearEnabled) { + executeOnLocalOrRemoteJvm(i, new TestIgniteIdxRunnable() { + @Override public void run(int idx) throws Exception { + assertTrue(((IgniteKernal)ignite(idx)).internalCache().context().isNear()); + } + }); + } Integer nearPeekVal = nearEnabled ? 1 : null; @@ -306,7 +317,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < gridCount(); i++) { IgniteEx ignite = grid(i); - if (!ignite.configuration().isClientMode()) { + if (!Boolean.TRUE.equals(ignite.configuration().isClientMode())) { if (ignite0 == null) ignite0 = ignite; else if (ignite1 == null) @@ -396,7 +407,8 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti } }; - info("All affinity nodes: " + affinityNodes()); + if (!isMultiJvm()) + info("All affinity nodes: " + affinityNodes()); IgniteCache cache = grid(0).cache(null); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..e2ac8a7 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest + extends GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..dfffc70 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest extends + GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.java new file mode 100644 index 0000000..2d8b9a5 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest extends + GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..1388a75 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest extends + GridCacheAtomicCopyOnReadDisabledMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..5808f28 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest extends + GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..0d6a1ce --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmFullApiSelfTest.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicMultiJvmFullApiSelfTest extends GridCacheAtomicMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.java new file mode 100644 index 0000000..0f35862 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest extends + GridCacheAtomicMultiNodeP2PDisabledFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..44e0a6d --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest extends + GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..44f3c6f --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest extends + GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..e23ab52 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest extends + GridCacheAtomicNearEnabledPrimaryWriteOrderMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..a2850c2 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest extends + GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java new file mode 100644 index 0000000..f07d51d --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest extends + GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..8eb4db1 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicOffHeapMultiJvmFullApiSelfTest extends + GridCacheAtomicOffHeapMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..185e8c7 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest + extends GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } + + /** {@inheritDoc} */ + @Override public void testLocalClearKeys() throws Exception { + fail("https://issues.apache.org/jira/browse/IGNITE-1107"); + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..421ce32 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest extends + GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest.java new file mode 100644 index 0000000..928b955 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest extends + GridCacheAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8218fe6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest.java new file mode 100644 index 0000000..c805377 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.multijvm; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * Multi-JVM tests. + */ +public class GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest extends + GridCacheAtomicPrimaryWriteOrderMultiNodeP2PDisabledFullApiSelfTest { + /** {@inheritDoc} */ + protected boolean isMultiJvm() { + return true; + } +}