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 8ae56fc07a4ad..7a890b7870b68 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 @@ -95,7 +95,6 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; @@ -200,8 +199,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); - ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setForceServerMode(true); - cfg.setIncludeEventTypes( EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_LOCKED, @@ -294,11 +291,11 @@ public void testWriteThroughTx() { storeStgy.removeFromStore(key); - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); try (Transaction tx = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL ? - grid(0).transactions().txStart() : null) { + defaultInstance().transactions().txStart() : null) { // retrieve market type from the grid Integer old = cache.withSkipStore().get(key); @@ -322,7 +319,7 @@ public void testWriteThroughTx() { public void testNoReadThroughTx() { String key = "writeThroughKey"; - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); storeStgy.resetStore(); @@ -332,7 +329,7 @@ public void testNoReadThroughTx() { try (Transaction tx = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL ? - grid(0).transactions().txStart() : null) { + defaultInstance().transactions().txStart() : null) { Integer old = cache.get(key); assertEquals((Integer)1, old); @@ -377,7 +374,7 @@ public void testNoReadThroughTx() { assertEquals(0, cache.localSize()); assertEquals(0, cache.size()); - dfltIgnite = grid(0); + dfltIgnite = defaultInstance(); } /** {@inheritDoc} */ @@ -415,7 +412,7 @@ public void testSize() throws Exception { map.put("key" + i, i); // Put in primary nodes to avoid near readers which will prevent entry from being cleared. - Map> mapped = grid(0).affinity(DEFAULT_CACHE_NAME).mapKeysToNodes(map.keySet()); + Map> mapped = defaultInstance().affinity(DEFAULT_CACHE_NAME).mapKeysToNodes(map.keySet()); for (int i = 0; i < gridCount(); i++) { Collection keys = mapped.get(grid(i).localNode()); @@ -428,7 +425,7 @@ public void testSize() throws Exception { map.remove("key0"); - mapped = grid(0).affinity(DEFAULT_CACHE_NAME).mapKeysToNodes(map.keySet()); + mapped = defaultInstance().affinity(DEFAULT_CACHE_NAME).mapKeysToNodes(map.keySet()); for (int i = 0; i < gridCount(); i++) { // Will actually delete entry from map. @@ -487,7 +484,7 @@ public void testContainsKeyTx() throws Exception { IgniteCache cache = jcache(); - IgniteTransactions txs = ignite(0).transactions(); + IgniteTransactions txs = defaultInstance().transactions(); for (int i = 0; i < 10; i++) { String key = String.valueOf(i); @@ -528,7 +525,7 @@ public void testContainsKeysTx() throws Exception { IgniteCache cache = jcache(); - IgniteTransactions txs = ignite(0).transactions(); + IgniteTransactions txs = defaultInstance().transactions(); Set keys = new HashSet<>(); @@ -1217,7 +1214,7 @@ private void checkIgniteTransform(TransactionConcurrency concurrency, Transactio cache.put("key2", 1); cache.put("key3", 3); - Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, isolation) : null; + Transaction tx = txShouldBeUsed() ? defaultInstance().transactions().txStart(concurrency, isolation) : null; try { assertEquals("null", cache.invoke("key1", INCR_IGNITE_PROCESSOR)); @@ -1271,7 +1268,7 @@ private void checkTransform(TransactionConcurrency concurrency, TransactionIsola cache.put("key2", 1); cache.put("key3", 3); - Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, isolation) : null; + Transaction tx = txShouldBeUsed() ? defaultInstance().transactions().txStart(concurrency, isolation) : null; try { assertEquals("null", cache.invoke("key1", INCR_PROCESSOR)); @@ -1361,7 +1358,7 @@ private void checkTransformAll(TransactionConcurrency concurrency, TransactionIs if (txShouldBeUsed()) { Map> res; - try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) { + try (Transaction tx = defaultInstance().transactions().txStart(concurrency, isolation)) { res = cache.invokeAll(F.asSet("key1", "key2", "key3"), INCR_PROCESSOR); tx.commit(); @@ -1519,7 +1516,7 @@ private void checkTransformSequential0(boolean startVal, TransactionConcurrency final String key = primaryKeysForCache(cache, 1).get(0); - Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, READ_COMMITTED) : null; + Transaction tx = txShouldBeUsed() ? defaultInstance().transactions().txStart(concurrency, READ_COMMITTED) : null; try { if (startVal) @@ -1582,7 +1579,7 @@ private void checkTransformAfterRemove(TransactionConcurrency concurrency) throw cache.put("key", 4); - Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, READ_COMMITTED) : null; + Transaction tx = txShouldBeUsed() ? defaultInstance().transactions().txStart(concurrency, READ_COMMITTED) : null; try { cache.remove("key"); @@ -1657,7 +1654,7 @@ private void checkTransformReturnValue(boolean put, if (!put) cache.put("key", 1); - Transaction tx = txShouldBeUsed() ? ignite(0).transactions().txStart(concurrency, isolation) : null; + Transaction tx = txShouldBeUsed() ? defaultInstance().transactions().txStart(concurrency, isolation) : null; try { if (put) @@ -3168,7 +3165,7 @@ public void testGetAndRemove() throws Exception { */ @Test public void testGetAndRemoveObject() throws Exception { - IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache = defaultInstance().cache(DEFAULT_CACHE_NAME); TestValue val1 = new TestValue(1); TestValue val2 = new TestValue(2); @@ -3199,7 +3196,7 @@ public void testGetAndRemoveObject() throws Exception { */ @Test public void testGetAndPutObject() throws Exception { - IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache = defaultInstance().cache(DEFAULT_CACHE_NAME); TestValue val1 = new TestValue(1); TestValue val2 = new TestValue(2); @@ -3266,7 +3263,7 @@ public void testRemoveLoad() throws Exception { for (int i = 0; i < cnt; i++) { String key = String.valueOf(i); - if (grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) + if (defaultInstance().affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) assertEquals((Integer)i, peek(jcache(g), key)); else assertNull(peek(jcache(g), key)); @@ -3301,7 +3298,7 @@ public void testRemoveLoadAsync() throws Exception { for (int i = 0; i < cnt; i++) { String key = String.valueOf(i); - if (grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) + if (defaultInstance().affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) assertEquals((Integer)i, peek(jcache(g), key)); else assertNull(peek(jcache(g), key)); @@ -3581,7 +3578,7 @@ public void testRemoveAllWithNulls() throws Exception { } }, NullPointerException.class, null); - assertEquals(0, grid(0).cache(DEFAULT_CACHE_NAME).localSize()); + assertEquals(0, defaultInstance().cache(DEFAULT_CACHE_NAME).localSize()); GridTestUtils.assertThrows(log, new Callable() { @Override public Void call() throws Exception { @@ -3737,7 +3734,7 @@ public void testLoadAll() throws Exception { */ @Test public void testRemoveAfterClear() throws Exception { - IgniteEx ignite = grid(0); + IgniteEx ignite = defaultInstance(); boolean affNode = ignite.context().cache().internalCache(DEFAULT_CACHE_NAME).context().affinityNode(); @@ -3989,7 +3986,7 @@ public void testLockUnlock() throws Exception { final CountDownLatch lockCnt = new CountDownLatch(1); final CountDownLatch unlockCnt = new CountDownLatch(1); - grid(0).events().localListen(new IgnitePredicate() { + defaultInstance().events().localListen(new IgnitePredicate() { @Override public boolean apply(Event evt) { switch (evt.type()) { case EVT_CACHE_OBJECT_LOCKED: @@ -4169,7 +4166,7 @@ public void testPeekRemove() throws Exception { */ @Test public void testEvictExpired() throws Exception { - final IgniteCache cache = jcache(0); + final IgniteCache cache = jcache(); final String key = primaryKeysForCache(cache, 1).get(0); @@ -4181,9 +4178,9 @@ public void testEvictExpired() throws Exception { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); - grid(0).cache(DEFAULT_CACHE_NAME).withExpiryPolicy(expiry).put(key, 1); + defaultInstance().cache(DEFAULT_CACHE_NAME).withExpiryPolicy(expiry).put(key, 1); - final Affinity aff = ignite(0).affinity(DEFAULT_CACHE_NAME); + final Affinity aff = defaultInstance().affinity(DEFAULT_CACHE_NAME); boolean wait = waitForCondition(new GridAbsPredicate() { @Override public boolean apply() { @@ -4263,10 +4260,10 @@ public void testPeekExpiredTx() throws Exception { final String key = "1"; int ttl = 500; - try (Transaction tx = grid(0).transactions().txStart()) { + try (Transaction tx = defaultInstance().transactions().txStart()) { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); - grid(0).cache(DEFAULT_CACHE_NAME).withExpiryPolicy(expiry).put(key, 1); + defaultInstance().cache(DEFAULT_CACHE_NAME).withExpiryPolicy(expiry).put(key, 1); tx.commit(); } @@ -4567,7 +4564,7 @@ public void testLocalEvict() throws Exception { loadAll(cache, ImmutableSet.of(key1, key2), true); - Affinity aff = ignite(0).affinity(DEFAULT_CACHE_NAME); + Affinity aff = defaultInstance().affinity(DEFAULT_CACHE_NAME); for (int i = 0; i < gridCount(); i++) { if (aff.isPrimaryOrBackup(grid(i).cluster().localNode(), key1)) @@ -4606,7 +4603,7 @@ public void testCompactExpired() throws Exception { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); - grid(0).cache(DEFAULT_CACHE_NAME).withExpiryPolicy(expiry).put(key, 1); + defaultInstance().cache(DEFAULT_CACHE_NAME).withExpiryPolicy(expiry).put(key, 1); waitForCondition(new GridAbsPredicate() { @Override public boolean apply() { @@ -4698,28 +4695,28 @@ private void checkRemovexInTx(TransactionConcurrency concurrency, TransactionIso if (txShouldBeUsed()) { final int cnt = 10; - CU.inTx(ignite(0), jcache(), concurrency, isolation, new CIX1>() { + CU.inTx(defaultInstance(), jcache(), concurrency, isolation, new CIX1>() { @Override public void applyx(IgniteCache cache) { for (int i = 0; i < cnt; i++) cache.put("key" + i, i); } }); - CU.inTx(ignite(0), jcache(), concurrency, isolation, new CIX1>() { + CU.inTx(defaultInstance(), jcache(), concurrency, isolation, new CIX1>() { @Override public void applyx(IgniteCache cache) { for (int i = 0; i < cnt; i++) assertEquals(new Integer(i), cache.get("key" + i)); } }); - CU.inTx(ignite(0), jcache(), concurrency, isolation, new CIX1>() { + CU.inTx(defaultInstance(), jcache(), concurrency, isolation, new CIX1>() { @Override public void applyx(IgniteCache cache) { for (int i = 0; i < cnt; i++) assertTrue("Failed to remove key: key" + i, cache.remove("key" + i)); } }); - CU.inTx(ignite(0), jcache(), concurrency, isolation, new CIX1>() { + CU.inTx(defaultInstance(), jcache(), concurrency, isolation, new CIX1>() { @Override public void applyx(IgniteCache cache) { for (int i = 0; i < cnt; i++) assertNull(cache.get("key" + i)); @@ -4866,7 +4863,7 @@ private void checkContainsKey(boolean exp, String key) throws Exception { * @return Ignite instance for primary node. */ protected Ignite primaryIgnite(String key) { - ClusterNode node = grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToNode(key); + ClusterNode node = defaultInstance().affinity(DEFAULT_CACHE_NAME).mapKeyToNode(key); if (node == null) throw new IgniteException("Failed to find primary node."); @@ -4924,7 +4921,7 @@ protected IgnitePair entryTtl(IgniteCache cache, String key) { */ @Test public void testIterator() throws Exception { - IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache = defaultInstance().cache(DEFAULT_CACHE_NAME); final int KEYS = 1000; @@ -4952,7 +4949,7 @@ public void testIterator() throws Exception { */ @Test public void testIgniteCacheIterator() throws Exception { - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); Iterator> it = cache.iterator(); @@ -4999,7 +4996,7 @@ public void testIgniteCacheIterator() throws Exception { */ @Test public void testIteratorLeakOnCancelCursor() throws Exception { - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); final int SIZE = 10_000; @@ -5034,7 +5031,7 @@ public void testIteratorLeakOnCancelCursor() throws Exception { * If hasNext() is called repeatedly, it should return the same result. */ private void checkIteratorHasNext() { - Iterator> iter = jcache(0).iterator(); + Iterator> iter = jcache().iterator(); assertEquals(iter.hasNext(), iter.hasNext()); @@ -5062,7 +5059,7 @@ private void checkIteratorRemove(IgniteCache cache, Map> iter = jcache(0).iterator(); + final Iterator> iter = jcache().iterator(); assertTrue(iter.hasNext()); @@ -5227,7 +5224,7 @@ protected void checkLocalRemovedKey(String keyToRmv) { boolean found = primaryIgnite(key).cache(DEFAULT_CACHE_NAME).localPeek(key) != null; if (keyToRmv.equals(key)) { - Collection nodes = grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key); + Collection nodes = defaultInstance().affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key); for (int j = 0; j < gridCount(); ++j) { if (nodes.contains(grid(j).localNode()) && grid(j) != primaryIgnite(key)) @@ -5248,7 +5245,7 @@ protected void checkLocalRemovedKey(String keyToRmv) { public void testLocalClearKeys() throws Exception { Map> keys = addKeys(); - Ignite g = grid(0); + Ignite g = defaultInstance(); Set keysToRmv = new HashSet<>(); @@ -5425,7 +5422,7 @@ protected void testGlobalClearKey(boolean async, Collection keysToRmv, b */ @Test public void testWithSkipStore() throws Exception { - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); IgniteCache cacheSkipStore = cache.withSkipStore(); @@ -5638,7 +5635,7 @@ public void testWithSkipStoreRemoveAll() throws Exception { if (atomicityMode() == TRANSACTIONAL || (atomicityMode() == ATOMIC && nearEnabled())) // TODO IGNITE-373. return; - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); IgniteCache cacheSkipStore = cache.withSkipStore(); @@ -5678,7 +5675,7 @@ public void testWithSkipStoreRemoveAll() throws Exception { @Test public void testWithSkipStoreTx() throws Exception { if (txShouldBeUsed()) { - IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache = defaultInstance().cache(DEFAULT_CACHE_NAME); IgniteCache cacheSkipStore = cache.withSkipStore(); @@ -6006,7 +6003,7 @@ private void checkGetOutTx(boolean async) throws Exception { }; try { - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); List keys = primaryKeysForCache(cache, 2); @@ -6015,7 +6012,7 @@ private void checkGetOutTx(boolean async) throws Exception { cache.put(keys.get(0), 0); cache.put(keys.get(1), 1); - grid(0).events().localListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED); + defaultInstance().events().localListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED); try (Transaction ignored = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL ? @@ -6050,7 +6047,7 @@ private void checkGetOutTx(boolean async) throws Exception { return lockEvtCnt.get() == 0; if (cacheMode() == PARTITIONED && nearEnabled()) { - if (!grid(0).configuration().isClientMode()) + if (!defaultInstance().configuration().isClientMode()) return lockEvtCnt.get() == 4; } @@ -6059,7 +6056,7 @@ private void checkGetOutTx(boolean async) throws Exception { }, 15000)); } finally { - grid(0).events().stopLocalListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED); + defaultInstance().events().stopLocalListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED); } } @@ -6095,11 +6092,11 @@ public void testLockInsideTransaction() throws Exception { log, new Callable() { @Override public Object call() throws Exception { - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); try (Transaction ignored = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL ? - ignite(0).transactions().txStart() : null) { + defaultInstance().transactions().txStart() : null) { cache.lock("key").lock(); } @@ -6116,11 +6113,11 @@ public void testLockInsideTransaction() throws Exception { log, new Callable() { @Override public Object call() throws Exception { - IgniteCache cache = jcache(0); + IgniteCache cache = jcache(); try (Transaction tx = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL ? - ignite(0).transactions().txStart() : null) { + defaultInstance().transactions().txStart() : null) { cache.lockAll(Arrays.asList("key1", "key2")).lock(); } @@ -6140,15 +6137,15 @@ public void testLockInsideTransaction() throws Exception { */ @Test public void testTransformResourceInjection() throws Exception { - ClusterGroup servers = grid(0).cluster().forServers(); + ClusterGroup servers = defaultInstance().cluster().forServers(); if (F.isEmpty(servers.nodes())) return; - grid(0).services( grid(0).cluster()).deployNodeSingleton(SERVICE_NAME1, new DummyServiceImpl()); + defaultInstance().services( defaultInstance().cluster()).deployNodeSingleton(SERVICE_NAME1, new DummyServiceImpl()); IgniteCache cache = jcache(); - Ignite ignite = ignite(0); + Ignite ignite = defaultInstance(); doTransformResourceInjection(ignite, cache, false, false); doTransformResourceInjection(ignite, cache, true, false); 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 7fe86c2513cee..20ead18dde588 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 @@ -38,6 +38,7 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; import org.apache.ignite.internal.util.lang.GridAbsPredicateX; @@ -340,7 +341,14 @@ protected final boolean partitionedMode() { */ @SuppressWarnings({"unchecked"}) @Override protected IgniteCache jcache() { - return jcache(0); + return defaultInstance().cache(DEFAULT_CACHE_NAME); + } + + /** + * @return Default Ignite instance. + */ + public IgniteEx defaultInstance() { + return grid(0); } /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java index f3bc6abffefcb..7c37ac059d69a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java @@ -203,7 +203,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache long ttl = 500; - grid(0).cache(DEFAULT_CACHE_NAME). + defaultInstance().cache(DEFAULT_CACHE_NAME). withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl))).put(key, 1); boolean wait = waitForCondition(new GridAbsPredicate() { @@ -303,7 +303,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache long ttl = 500; - grid(0).cache(DEFAULT_CACHE_NAME). + defaultInstance().cache(DEFAULT_CACHE_NAME). withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl))).put(key, 1); Thread.sleep(ttl + 100); 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 901b0aa6cd7c7..edc79f12a77ad 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 @@ -25,11 +25,11 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Lock; import javax.cache.expiry.Duration; import javax.cache.expiry.ExpiryPolicy; import javax.cache.expiry.TouchedExpiryPolicy; +import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteTransactions; @@ -40,9 +40,11 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.events.Event; import org.apache.ignite.events.EventType; +import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; +import org.apache.ignite.internal.processors.resource.GridSpringResourceContext; import org.apache.ignite.internal.util.lang.GridAbsPredicateX; import org.apache.ignite.internal.util.lang.IgnitePair; import org.apache.ignite.internal.util.typedef.F; @@ -50,6 +52,7 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.SupplierX; import org.apache.ignite.transactions.Transaction; import org.junit.Test; @@ -61,16 +64,14 @@ * */ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest { - /** */ - private static AtomicInteger cnt; - /** Index of the near-only instance. */ protected Integer nearIdx; + /** */ + protected boolean isMultiJvm; + /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - cnt = new AtomicInteger(); - super.beforeTestsStarted(); for (int i = 0; i < gridCount(); i++) { @@ -96,7 +97,7 @@ protected boolean clientHasNearCache() { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - if (cnt.getAndIncrement() == 0 || (cnt.get() > gridCount() && cnt.get() % gridCount() == 0)) { + if (igniteInstanceName.equals(getTestIgniteInstanceName(gridCount() - 1))) { info("Use grid '" + igniteInstanceName + "' as near-only."); cfg.setClientMode(true); @@ -109,6 +110,61 @@ protected boolean clientHasNearCache() { return cfg; } + /** {@inheritDoc} */ + @Override protected Ignite startGrid(String igniteInstanceName, GridSpringResourceContext ctx) throws Exception { + return sameJvmForClientNode(() -> super.startGrid(igniteInstanceName, ctx), igniteInstanceName); + } + + /** */ + public R sameJvmForClientNode(SupplierX s, String igniteInstanceName) { + boolean prevMultiJvm = isMultiJvm; + + try { + if (isMultiJvm && getConfiguration(igniteInstanceName).isClientMode()) + isMultiJvm = false; + + return s.get(); + } + catch (Exception e) { + throw new RuntimeException(e); + } + finally { + isMultiJvm = prevMultiJvm; + } + } + + /** {@inheritDoc} */ + @Override protected IgniteEx grid(int idx) { + return sameJvmForClientNode(() -> super.grid(idx), getTestIgniteInstanceName(idx)); + } + + /** {@inheritDoc} */ + @Override protected IgniteEx ignite(int idx) { + return sameJvmForClientNode(() -> super.ignite(idx), getTestIgniteInstanceName(idx)); + } + + /** {@inheritDoc} */ + @Override protected void stopGrid(String igniteInstanceName, boolean cancel, boolean awaitTop) { + sameJvmForClientNode(() -> { + super.stopGrid(igniteInstanceName, cancel, awaitTop); + return null; + }, igniteInstanceName); + } + + /** {@inheritDoc} */ + @Override public IgniteEx defaultInstance() { + IgniteEx cli = grid(gridCount() - 1); + + assertTrue(cli.configuration().isClientMode()); + + return cli; + } + + /** {@inheritDoc} */ + @Override protected boolean isMultiJvm() { + return isMultiJvm; + } + /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName); @@ -152,7 +208,7 @@ protected boolean clientHasNearCache() { * @return A not near-only cache. */ @Override protected IgniteCache fullCache() { - return nearIdx == 0 ? jcache(1) : jcache(0); + return nearIdx == (gridCount() - 1) ? jcache(1) : jcache(); } /** @@ -566,7 +622,7 @@ else if (i == nearIdx) final CountDownLatch lockCnt = new CountDownLatch(1); final CountDownLatch unlockCnt = new CountDownLatch(1); - grid(0).events().localListen(new IgnitePredicate() { + defaultInstance().events().localListen(new IgnitePredicate() { @Override public boolean apply(Event evt) { switch (evt.type()) { case EVT_CACHE_OBJECT_LOCKED: diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java deleted file mode 100644 index 9cd11846d6948..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.distributed.near; - -import java.util.Arrays; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.IgniteException; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.NearCacheConfiguration; -import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; -import org.apache.ignite.internal.util.typedef.X; -import org.apache.ignite.lang.IgniteClosure; -import org.junit.Test; - -/** - * Tests for local cache. - */ -public class GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest extends GridCachePartitionedFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected NearCacheConfiguration nearConfiguration() { - return null; - } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setClientMode(true); - - return cfg; - } - - /** - * - */ - @Test - public void testMapKeysToNodes() { - grid(0).affinity(DEFAULT_CACHE_NAME).mapKeysToNodes(Arrays.asList("1", "2")); - } - - /** - * - */ - @Test - public void testMapKeyToNode() { - assert grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToNode("1") == null; - } - - /** - * @return Handler that discards grid exceptions. - */ - @Override protected IgniteClosure errorHandler() { - return new IgniteClosure() { - @Override public Throwable apply(Throwable e) { - if (e instanceof IgniteException || e instanceof IgniteCheckedException || - X.hasCause(e, ClusterTopologyCheckedException.class)) { - info("Discarding exception: " + e); - - return null; - } - else - return e; - } - }; - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java index 6674076a65e60..ff9b845c796b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java @@ -60,7 +60,7 @@ public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullAp @Test public void testUpdate() throws Exception { if (gridCount() > 1) { - IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache = defaultInstance().cache(DEFAULT_CACHE_NAME); Integer key = nearKey(cache); 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 d118bc583d296..b8730573ce0a7 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 @@ -63,7 +63,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti * @return Affinity nodes for this cache. */ public Collection affinityNodes() { - return grid(0).cluster().nodes(); + return defaultInstance().cluster().nodes(); } /** @@ -81,7 +81,7 @@ public void testPutAllRemoveAll() throws Exception { for (int i = 0; i < size; i++) putMap.put(i, i * i); - IgniteCache c0 = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache c0 = defaultInstance().cache(DEFAULT_CACHE_NAME); IgniteCache c1 = grid(1).cache(DEFAULT_CACHE_NAME); c0.putAll(putMap); @@ -109,7 +109,7 @@ public void testPutAllPutAll() throws Exception { for (int i = 0; i < size; i++) putMap.put(i, i); - IgniteCache prj0 = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache prj0 = defaultInstance().cache(DEFAULT_CACHE_NAME); IgniteCache prj1 = grid(1).cache(DEFAULT_CACHE_NAME); prj0.putAll(putMap); @@ -144,7 +144,7 @@ public void testPutDebug() throws Exception { final int size = 10; - IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache0 = defaultInstance().cache(DEFAULT_CACHE_NAME); for (int i = 0; i < size; i++) { info("Putting value [i=" + i + ']'); @@ -283,8 +283,8 @@ else if (ignite1 == null) for (int i = 0; i < 10_000 && keys.size() < 5; i++) { String key = String.valueOf(i); - if (ignite(0).affinity(DEFAULT_CACHE_NAME).isPrimary(ignite0.localNode(), key) && - ignite(0).affinity(DEFAULT_CACHE_NAME).isBackup(ignite1.localNode(), key)) { + if (defaultInstance().affinity(DEFAULT_CACHE_NAME).isPrimary(ignite0.localNode(), key) && + defaultInstance().affinity(DEFAULT_CACHE_NAME).isBackup(ignite1.localNode(), key)) { keys.add(key); cache0.put(key, val++); @@ -351,7 +351,7 @@ public void testAffinity() throws Exception { if (!isMultiJvm()) info("All affinity nodes: " + affinityNodes()); - IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); + IgniteCache cache = defaultInstance().cache(DEFAULT_CACHE_NAME); info("Cache affinity nodes: " + affinity(cache).mapKeyToPrimaryAndBackups(key)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.java deleted file mode 100644 index 93e874c759dc6..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.distributed.near; - -import org.apache.ignite.configuration.NearCacheConfiguration; - -/** - * Tests for local cache. - */ -public class GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest - extends GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected NearCacheConfiguration nearConfiguration() { - return new NearCacheConfiguration(); - } -} 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 index 775ea551a2aef..455c3463db462 100644 --- 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 @@ -24,8 +24,8 @@ */ public class GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest extends GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest() { + isMultiJvm = true; } } 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 index 7c2056eac0475..741597ceb4a46 100644 --- 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 @@ -24,8 +24,8 @@ */ public class GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest extends GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest() { + isMultiJvm = true; } } 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 index 3b2f732f65b61..ad4851b2d559d 100644 --- 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 @@ -24,8 +24,8 @@ */ public class GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest extends GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest() { + isMultiJvm = true; } } 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 index a25c1ca2c2314..7b209d2b53a6e 100644 --- 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 @@ -24,8 +24,8 @@ */ public class GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest extends GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest() { + isMultiJvm = true; } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmFullApiSelfTest.java index 316f3b81fb8d8..ed9ad73e4d98b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmFullApiSelfTest.java @@ -23,8 +23,8 @@ * Multi-JVM tests. */ public class GridCacheNearOnlyMultiJvmFullApiSelfTest extends GridCacheNearOnlyMultiNodeFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheNearOnlyMultiJvmFullApiSelfTest() { + isMultiJvm = true; } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java index 4ebcb32fe23eb..cf0638071e778 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.java @@ -24,8 +24,8 @@ */ public class GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest extends GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest() { + isMultiJvm = true; } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java index 959d60bf633d0..c4f8b4e3a585b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java @@ -24,8 +24,8 @@ */ public class GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest extends GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isMultiJvm() { - return true; + /** */ + public GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest() { + isMultiJvm = true; } } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java index 4199308af1b06..380d216d62c45 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java @@ -56,7 +56,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearTxMultiNodeSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedAtomicOnheapFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest; -import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFilteredPutSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFullApiMultithreadedSelfTest; @@ -65,7 +64,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeWithGroupFullApiSelfTest; -import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapMultiNodeFullApiSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest; @@ -100,10 +98,6 @@ GridCachePartitionedNearDisabledOnheapFullApiSelfTest.class, GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.class, - // No primary. - GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.class, - GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.class, - // Multi-node. GridCacheReplicatedMultiNodeFullApiSelfTest.class, GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class,