You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/04/28 12:44:38 UTC
[10/64] [abbrv] ignite git commit: IGNITE-3488: Prohibited null as
cache name. This closes #1790.
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
index 146c6aa..33766f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
@@ -56,7 +56,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
super.beforeTestsStarted();
if (nearEnabled())
- grid(nearOnlyIgniteInstanceName).createNearCache(null, nearConfiguration());
+ grid(nearOnlyIgniteInstanceName).createNearCache(DEFAULT_CACHE_NAME, nearConfiguration());
}
/** {@inheritDoc} */
@@ -119,8 +119,8 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
for (int key = 0; key < 10; key++) {
for (int i = 0; i < gridCount(); i++) {
- if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key))
- assertEquals(key, grid(i).cache(null).localPeek(key));
+ if (grid(i).affinity(DEFAULT_CACHE_NAME).isPrimaryOrBackup(grid(i).localNode(), key))
+ assertEquals(key, grid(i).cache(DEFAULT_CACHE_NAME).localPeek(key));
}
if (nearEnabled())
@@ -139,8 +139,8 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
assertNull(nearOnly.localPeek(key, CachePeekMode.ALL));
for (int i = 0; i < gridCount(); i++) {
- if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
- TestClass1 val = (TestClass1)grid(i).cache(null).localPeek(key);
+ if (grid(i).affinity(DEFAULT_CACHE_NAME).isPrimaryOrBackup(grid(i).localNode(), key)) {
+ TestClass1 val = (TestClass1)grid(i).cache(DEFAULT_CACHE_NAME).localPeek(key);
assertNotNull(val);
assertEquals(key.intValue(), val.val);
@@ -196,7 +196,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
if (F.eq(g.name(), nearOnlyIgniteInstanceName)) {
for (int k = 0; k < 10000; k++) {
- IgniteCache<Object, Object> cache = g.cache(null);
+ IgniteCache<Object, Object> cache = g.cache(DEFAULT_CACHE_NAME);
String key = "key" + k;
@@ -213,10 +213,10 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
for (int k = 0; k < 10000; k++) {
String key = "key" + k;
- if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key))
+ if (g.affinity(DEFAULT_CACHE_NAME).isPrimaryOrBackup(g.cluster().localNode(), key))
foundEntry = true;
- if (g.affinity(null).mapKeyToPrimaryAndBackups(key).contains(g.cluster().localNode()))
+ if (g.affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(g.cluster().localNode()))
foundAffinityNode = true;
}
@@ -232,7 +232,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
protected IgniteCache<Object, Object> nearOnlyCache() {
assert nearOnlyIgniteInstanceName != null;
- return G.ignite(nearOnlyIgniteInstanceName).cache(null);
+ return G.ignite(nearOnlyIgniteInstanceName).cache(DEFAULT_CACHE_NAME);
}
/**
@@ -241,7 +241,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
protected IgniteCache<Object, Object> dhtCache() {
for (int i = 0; i < gridCount(); i++) {
if (!nearOnlyIgniteInstanceName.equals(grid(i).name()))
- return grid(i).cache(null);
+ return grid(i).cache(DEFAULT_CACHE_NAME);
}
assert false : "Cannot find DHT cache for this test.";
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
index dddb32b..aea6ce6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
@@ -73,7 +73,7 @@ public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstrac
log.info("Use cache " + idx);
- IgniteCache<Object, Object> cache = grid(idx).cache(null);
+ IgniteCache<Object, Object> cache = grid(idx).cache(DEFAULT_CACHE_NAME);
for (int i = 0; i < 100; i++)
putAndCheckEntrySet(cache);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java
index 4cbf2ed..0bd2d1e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java
@@ -111,8 +111,8 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest {
ignite1 = startGrid(1);
ignite2 = startGrid(2);
- cache1 = ignite1.cache(null);
- cache2 = ignite2.cache(null);
+ cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+ cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
}
/** {@inheritDoc} */
@@ -507,7 +507,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest {
* @throws Throwable If failed.
*/
public void testLockReentrancy() throws Throwable {
- Affinity<Integer> aff = ignite1.affinity(null);
+ Affinity<Integer> aff = ignite1.affinity(DEFAULT_CACHE_NAME);
for (int i = 10; i < 100; i++) {
log.info("Test lock [key=" + i +
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java
index 59f9a3f..fee1355 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java
@@ -48,7 +48,7 @@ public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest {
* @return Cache configuration.
*/
private CacheConfiguration cacheConfiguration(String igniteInstanceName) {
- CacheConfiguration cfg = new CacheConfiguration();
+ CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
cfg.setCacheMode(CacheMode.PARTITIONED);
@@ -69,7 +69,7 @@ public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testBasicOps() throws Exception {
- IgniteCache<Object, Object> cache = grid(0).cache(null);
+ IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME);
for (int i = 0; i < 1000; i++)
cache.put(i, i);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
index 67327be..4406800 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
@@ -91,9 +91,9 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
ignite2 = startGrid(2);
ignite3 = startGrid(3);
- cache1 = ignite1.cache(null);
- cache2 = ignite2.cache(null);
- cache3 = ignite3.cache(null);
+ cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+ cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
+ cache3 = ignite3.cache(DEFAULT_CACHE_NAME);
}
/** {@inheritDoc} */
@@ -190,7 +190,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
for (Ignite ignite : ignites)
addListener(ignite, lsnr);
- IgniteCache<Integer, String> cache1 = ignites[0].cache(null);
+ IgniteCache<Integer, String> cache1 = ignites[0].cache(DEFAULT_CACHE_NAME);
for (int i = 1; i <= cnt; i++)
cache1.put(i, "val" + i);
@@ -205,7 +205,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
latch.await(10, SECONDS);
for (Ignite ignite : ignites) {
- IgniteCache<Integer, String> cache = ignite.cache(null);
+ IgniteCache<Integer, String> cache = ignite.cache(DEFAULT_CACHE_NAME);
if (cache == cache1)
continue;
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
index daccc69..822a7c4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
@@ -49,9 +49,6 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_UNLOCKED;
*/
public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstractTest {
/** */
- private static final String CACHE1 = null;
-
- /** */
private static final String CACHE2 = "cache2";
/** Grid 1. */
@@ -83,7 +80,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
cfg.setDiscoverySpi(disco);
- CacheConfiguration ccfg1 = cacheConfiguration().setName(CACHE1);
+ CacheConfiguration ccfg1 = cacheConfiguration().setName(DEFAULT_CACHE_NAME);
CacheConfiguration ccfg2 = cacheConfiguration().setName(CACHE2);
cfg.setCacheConfiguration(ccfg1, ccfg2);
@@ -130,7 +127,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
jcache(i).clear();
assertTrue(
- "Cache isn't empty [i=" + i + ", entries=" + ((IgniteKernal)grid(i)).internalCache().entries() + "]",
+ "Cache isn't empty [i=" + i + ", entries=" + ((IgniteKernal)grid(i)).internalCache(DEFAULT_CACHE_NAME).entries() + "]",
jcache(i).localSize() == 0);
}
}
@@ -231,7 +228,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
* @throws Exception If test failed.
*/
public void testBasicLock() throws Exception {
- IgniteCache<Integer, String> cache = ignite1.cache(null);
+ IgniteCache<Integer, String> cache = ignite1.cache(DEFAULT_CACHE_NAME);
Lock lock = cache.lock(1);
@@ -264,16 +261,16 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
", de2=" + dht2.peekEx(key) + ']';
}
- return "Entries [e1=" + "(" + key + ", " + ((IgniteKernal)ignite1).internalCache(null).get(key) + ")"
- + ", e2=" + "(" + key + ", " + ((IgniteKernal)ignite2).internalCache(null).get(key) + ")" + ']';
+ return "Entries [e1=" + "(" + key + ", " + ((IgniteKernal)ignite1).internalCache(DEFAULT_CACHE_NAME).get(key) + ")"
+ + ", e2=" + "(" + key + ", " + ((IgniteKernal)ignite2).internalCache(DEFAULT_CACHE_NAME).get(key) + ")" + ']';
}
/**
* @throws Exception If test fails.
*/
public void testMultiNodeLock() throws Exception {
- IgniteCache<Integer, String> cache1 = ignite1.cache(null);
- IgniteCache<Integer, String> cache2 = ignite2.cache(null);
+ IgniteCache<Integer, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+ IgniteCache<Integer, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
Lock lock1_1 = cache1.lock(1);
Lock lock2_1 = cache2.lock(1);
@@ -330,8 +327,8 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
* @throws Exception If test fails.
*/
public void testMultiNodeLockWithKeyLists() throws Exception {
- IgniteCache<Integer, String> cache1 = ignite1.cache(null);
- IgniteCache<Integer, String> cache2 = ignite2.cache(null);
+ IgniteCache<Integer, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+ IgniteCache<Integer, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
Collection<Integer> keys1 = Arrays.asList(1, 2, 3);
Collection<Integer> keys2 = Arrays.asList(2, 3, 4);
@@ -407,7 +404,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
* @throws IgniteCheckedException If test failed.
*/
public void testLockReentry() throws IgniteCheckedException {
- IgniteCache<Integer, String> cache = ignite1.cache(null);
+ IgniteCache<Integer, String> cache = ignite1.cache(DEFAULT_CACHE_NAME);
Lock lock = cache.lock(1);
@@ -435,7 +432,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
* @throws Exception If test failed.
*/
public void testLockMultithreaded() throws Exception {
- final IgniteCache<Integer, String> cache = ignite1.cache(null);
+ final IgniteCache<Integer, String> cache = ignite1.cache(DEFAULT_CACHE_NAME);
final CountDownLatch l1 = new CountDownLatch(1);
final CountDownLatch l2 = new CountDownLatch(1);
@@ -553,7 +550,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
* @throws Exception If failed.
*/
public void testTwoCaches() throws Exception {
- IgniteCache<Integer, String> cache1 = ignite1.cache(CACHE1);
+ IgniteCache<Integer, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
IgniteCache<Integer, String> cache2 = ignite1.cache(CACHE2);
final Integer key = primaryKey(cache1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
index d3a2ca7..7bb0012 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
@@ -205,7 +205,7 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
* @throws Exception If failed.
*/
private IgniteConfiguration configuration(int idx) throws Exception {
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(CACHE_NAME);
ccfg.setCacheMode(cacheMode());
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
index cd475fe..3834df9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
@@ -134,7 +134,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
* @return Cache.
*/
@Override protected <K, V> IgniteCache<K, V> jcache(int i) {
- return IGNITEs.get(i).cache(null);
+ return IGNITEs.get(i).cache(DEFAULT_CACHE_NAME);
}
/**
@@ -176,7 +176,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
Transaction tx = g.transactions().txStart(concurrency, isolation);
try {
- g.cache(null).put(KEY, VALUE);
+ g.cache(DEFAULT_CACHE_NAME).put(KEY, VALUE);
int checkIdx = (idx + 1) % G.allGrids().size();
@@ -243,7 +243,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
info("Grid will be stopped: " + idx);
- info("Nodes for key [id=" + grid(idx).affinity(null).mapKeyToPrimaryAndBackups(KEY) +
+ info("Nodes for key [id=" + grid(idx).affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(KEY) +
", key=" + KEY + ']');
IgniteCache<Integer, String> cache = jcache(idx);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
index 9c94491..d25304b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
@@ -77,7 +77,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract
cfg.setCommunicationSpi(new TestTcpCommunicationSpi());
- CacheConfiguration<Integer, Integer> cacheCfg = new CacheConfiguration<>();
+ CacheConfiguration<Integer, Integer> cacheCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setBackups(backupCnt);
@@ -113,7 +113,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract
ignite(2).events().localListen(lsnr1, EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST);
ignite(3).events().localListen(lsnr2, EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST);
- Affinity<Integer> aff = ignite(0).affinity(null);
+ Affinity<Integer> aff = ignite(0).affinity(DEFAULT_CACHE_NAME);
int key = 0;
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
index 51e9564..87e121e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
@@ -127,7 +127,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
caches = new ArrayList<>(GRID_CNT);
for (int i = 0; i < GRID_CNT; i++)
- caches.add(startGrid(i).<Integer, String>cache(null));
+ caches.add(startGrid(i).<Integer, String>cache(DEFAULT_CACHE_NAME));
awaitPartitionMapExchange();
}
@@ -153,7 +153,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
@Override public void loadCache(IgniteBiInClosure<Integer, String> c,
Object... args) {
- X.println("Loading all on: " + caches.indexOf(((IgniteKernal)g).<Integer, String>getCache(null)));
+ X.println("Loading all on: " + caches.indexOf(((IgniteKernal)g).<Integer, String>getCache(DEFAULT_CACHE_NAME)));
for (Map.Entry<Integer, String> e : map.entrySet())
c.apply(e.getKey(), e.getValue());
@@ -161,7 +161,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
@Override public String load(Integer key) {
X.println("Loading on: " + caches.indexOf(((IgniteKernal)g)
- .<Integer, String>getCache(null)) + " key=" + key);
+ .<Integer, String>getCache(DEFAULT_CACHE_NAME)) + " key=" + key);
return map.get(key);
}
@@ -196,7 +196,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
fut.get();
- Affinity aff = ignite(0).affinity(null);
+ Affinity aff = ignite(0).affinity(DEFAULT_CACHE_NAME);
for (IgniteCache<Integer, String> cache : caches) {
for (Integer key : map.keySet()) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
index adbf1b7..59af680 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
@@ -98,7 +98,7 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA
public void testPreloadEvents() throws Exception {
Ignite g1 = startGrid("g1");
- IgniteCache<Integer, String> cache = g1.cache(null);
+ IgniteCache<Integer, String> cache = g1.cache(DEFAULT_CACHE_NAME);
cache.put(1, "val1");
cache.put(2, "val2");
@@ -122,7 +122,7 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA
for (Event evt : evts) {
CacheEvent cacheEvt = (CacheEvent)evt;
assertEquals(EVT_CACHE_REBALANCE_OBJECT_LOADED, cacheEvt.type());
- assertEquals(g.cache(null).getName(), cacheEvt.cacheName());
+ assertEquals(g.cache(DEFAULT_CACHE_NAME).getName(), cacheEvt.cacheName());
assertEquals(g.cluster().localNode().id(), cacheEvt.node().id());
assertEquals(g.cluster().localNode().id(), cacheEvt.eventNode().id());
assertTrue(cacheEvt.hasNewValue());
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
index a48e1b6..6f27ce7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
@@ -123,7 +123,7 @@ public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest {
tCfg.setDefaultTxConcurrency(txConcurrency);
tCfg.setDefaultTxIsolation(txIsolation);
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(CACHE_NAME);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
index 69e97d8..ee1b48e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
@@ -101,7 +101,7 @@ public class IgniteBinaryMetadataUpdateNodeRestartTest extends GridCommonAbstrac
* @return Cache configuration.
*/
private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode) {
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
index 6d7ec90..3864fc5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
@@ -74,7 +74,7 @@ public class IgniteCache150ClientsTest extends GridCommonAbstractTest {
CacheConfiguration[] ccfgs = new CacheConfiguration[CACHES];
for (int i = 0 ; i < ccfgs.length; i++) {
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(i % 2 == 0 ? ATOMIC : TRANSACTIONAL);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
index 8fd8b81..9fe41f2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
@@ -173,7 +173,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
*/
private void atomicPut(final boolean putAll,
@Nullable NearCacheConfiguration nearCfg) throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -207,7 +207,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.blockMessages(GridNearAtomicFullUpdateRequest.class, ignite0.localNode().id());
spi.blockMessages(GridNearAtomicFullUpdateRequest.class, ignite1.localNode().id());
- final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -295,7 +295,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
private void atomicNoRemap() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -317,9 +317,9 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
final Map<Integer, Integer> map = new HashMap<>();
- map.put(primaryKey(ignite0.cache(null)), 0);
- map.put(primaryKey(ignite1.cache(null)), 1);
- map.put(primaryKey(ignite2.cache(null)), 2);
+ map.put(primaryKey(ignite0.cache(DEFAULT_CACHE_NAME)), 0);
+ map.put(primaryKey(ignite1.cache(DEFAULT_CACHE_NAME)), 1);
+ map.put(primaryKey(ignite2.cache(DEFAULT_CACHE_NAME)), 2);
TestCommunicationSpi spi = (TestCommunicationSpi)ignite3.configuration().getCommunicationSpi();
@@ -330,7 +330,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.record(GridNearAtomicFullUpdateRequest.class);
- final IgniteCache<Integer, Integer> cache = ignite3.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite3.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -362,9 +362,9 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
assertEquals(3, msgs.size());
- map.put(primaryKey(ignite0.cache(null)), 3);
- map.put(primaryKey(ignite1.cache(null)), 4);
- map.put(primaryKey(ignite2.cache(null)), 5);
+ map.put(primaryKey(ignite0.cache(DEFAULT_CACHE_NAME)), 3);
+ map.put(primaryKey(ignite1.cache(DEFAULT_CACHE_NAME)), 4);
+ map.put(primaryKey(ignite2.cache(DEFAULT_CACHE_NAME)), 5);
cache.putAll(map);
@@ -382,7 +382,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
private void atomicGetAndPut() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -395,7 +395,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
client = true;
- ignite0.cache(null).put(0, 0);
+ ignite0.cache(DEFAULT_CACHE_NAME).put(0, 0);
Ignite ignite2 = startGrid(2);
@@ -411,7 +411,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.blockMessages(GridNearAtomicFullUpdateRequest.class, ignite0.localNode().id());
spi.blockMessages(GridNearAtomicFullUpdateRequest.class, ignite1.localNode().id());
- final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<Integer> putFut = GridTestUtils.runAsync(new Callable<Integer>() {
@Override public Integer call() throws Exception {
@@ -442,7 +442,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testTxPutAll() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -469,7 +469,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.blockMessages(GridNearTxPrepareRequest.class, ignite0.localNode().id());
spi.blockMessages(GridNearTxPrepareRequest.class, ignite1.localNode().id());
- final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -523,7 +523,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
private void pessimisticTx(NearCacheConfiguration nearCfg) throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -555,7 +555,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.record(GridNearLockRequest.class);
- final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -670,17 +670,17 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
new AffinityTopologyVersion(topVer + 1),
1);
- AffinityFunction affFunc = ignite.cache(null).getConfiguration(CacheConfiguration.class).getAffinity();
+ AffinityFunction affFunc = ignite.cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getAffinity();
List<List<ClusterNode>> newAff = affFunc.assignPartitions(ctx);
- List<List<ClusterNode>> curAff = ((IgniteKernal)ignite).context().cache().internalCache(null).context().
+ List<List<ClusterNode>> curAff = ((IgniteKernal)ignite).context().cache().internalCache(DEFAULT_CACHE_NAME).context().
affinity().assignments(new AffinityTopologyVersion(topVer));
Integer key1 = null;
Integer key2 = null;
- Affinity<Integer> aff = ignite.affinity(null);
+ Affinity<Integer> aff = ignite.affinity(DEFAULT_CACHE_NAME);
for (int i = 0; i < curAff.size(); i++) {
if (key1 == null) {
@@ -733,7 +733,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testPessimisticTx2() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -755,7 +755,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
AffinityTopologyVersion topVer1 = new AffinityTopologyVersion(4, 0);
- assertEquals(topVer1, ignite0.context().cache().internalCache(null).context().topology().topologyVersion());
+ assertEquals(topVer1, ignite0.context().cache().internalCache(DEFAULT_CACHE_NAME).context().topology().topologyVersion());
TestCommunicationSpi spi = (TestCommunicationSpi)ignite3.configuration().getCommunicationSpi();
@@ -769,7 +769,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.blockMessages(GridNearLockRequest.class, ignite1.localNode().id());
spi.blockMessages(GridNearLockRequest.class, ignite2.localNode().id());
- final IgniteCache<Integer, Integer> cache = ignite3.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite3.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -796,9 +796,9 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
ignite0.context().cache().context().exchange().affinityReadyFuture(topVer2).get();
- assertEquals(topVer2, ignite0.context().cache().internalCache(null).context().topology().topologyVersion());
+ assertEquals(topVer2, ignite0.context().cache().internalCache(DEFAULT_CACHE_NAME).context().topology().topologyVersion());
- GridCacheAffinityManager aff = ignite0.context().cache().internalCache(null).context().affinity();
+ GridCacheAffinityManager aff = ignite0.context().cache().internalCache(DEFAULT_CACHE_NAME).context().affinity();
List<ClusterNode> nodes1 = aff.nodesByKey(key1, topVer1);
List<ClusterNode> nodes2 = aff.nodesByKey(key1, topVer2);
@@ -840,7 +840,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
private void pessimisticTxNoRemap(@Nullable NearCacheConfiguration nearCfg) throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -864,7 +864,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
TestCommunicationSpi spi = (TestCommunicationSpi)ignite3.configuration().getCommunicationSpi();
for (int i = 0; i < 100; i++)
- primaryCache(i, null).put(i, -1);
+ primaryCache(i, DEFAULT_CACHE_NAME).put(i, -1);
final Map<Integer, Integer> map = new HashMap<>();
@@ -877,7 +877,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.record(GridNearLockRequest.class);
- final IgniteCache<Integer, Integer> cache = ignite3.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite3.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -945,7 +945,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
private void optimisticSerializableTx(NearCacheConfiguration nearCfg) throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -977,7 +977,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.record(GridNearTxPrepareRequest.class);
- final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
IgniteInternalFuture<?> putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -1097,7 +1097,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
private void lock(NearCacheConfiguration nearCfg) throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1127,7 +1127,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.blockMessages(GridNearLockRequest.class, ignite0.localNode().id());
spi.blockMessages(GridNearLockRequest.class, ignite1.localNode().id());
- final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
final CountDownLatch lockedLatch = new CountDownLatch(1);
@@ -1165,7 +1165,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
assertTrue(lockedLatch.await(3000, TimeUnit.MILLISECONDS));
- IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
+ IgniteCache<Integer, Integer> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
for (Integer key : keys) {
Lock lock = cache0.lock(key);
@@ -1190,7 +1190,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
}
private boolean unlocked(Ignite ignite) {
- IgniteCache<Integer, Integer> cache = ignite.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
for (Integer key : keys) {
if (cache.isLocalLocked(key, false)) {
@@ -1219,7 +1219,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testPessimisticTxMessageClientFirstFlag() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1243,9 +1243,9 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi.record(GridNearLockRequest.class);
- IgniteCache<Integer, Integer> cache = ignite3.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite3.cache(DEFAULT_CACHE_NAME);
- Affinity<Integer> aff = ignite0.affinity(null);
+ Affinity<Integer> aff = ignite0.affinity(DEFAULT_CACHE_NAME);
try (Transaction tx = ignite3.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
Integer key1 = findKey(aff, 1);
@@ -1263,10 +1263,10 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
Map<Integer, Integer> map = new LinkedHashMap<>();
- map.put(primaryKey(ignite0.cache(null)), 4);
- map.put(primaryKey(ignite1.cache(null)), 5);
- map.put(primaryKey(ignite2.cache(null)), 6);
- map.put(primaryKeys(ignite0.cache(null), 1, 10_000).get(0), 7);
+ map.put(primaryKey(ignite0.cache(DEFAULT_CACHE_NAME)), 4);
+ map.put(primaryKey(ignite1.cache(DEFAULT_CACHE_NAME)), 5);
+ map.put(primaryKey(ignite2.cache(DEFAULT_CACHE_NAME)), 6);
+ map.put(primaryKeys(ignite0.cache(DEFAULT_CACHE_NAME), 1, 10_000).get(0), 7);
try (Transaction tx = ignite3.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
cache.putAll(map);
@@ -1282,9 +1282,9 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
spi0.record(GridNearLockRequest.class);
- List<Integer> keys = primaryKeys(ignite1.cache(null), 3, 0);
+ List<Integer> keys = primaryKeys(ignite1.cache(DEFAULT_CACHE_NAME), 3, 0);
- IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
+ IgniteCache<Integer, Integer> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
try (Transaction tx = ignite0.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
cache0.put(keys.get(0), 0);
@@ -1319,7 +1319,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testOptimisticTxMessageClientFirstFlag() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1341,11 +1341,11 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
TestCommunicationSpi spi = (TestCommunicationSpi)ignite3.configuration().getCommunicationSpi();
- IgniteCache<Integer, Integer> cache = ignite3.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite3.cache(DEFAULT_CACHE_NAME);
- List<Integer> keys0 = primaryKeys(ignite0.cache(null), 2, 0);
- List<Integer> keys1 = primaryKeys(ignite1.cache(null), 2, 0);
- List<Integer> keys2 = primaryKeys(ignite2.cache(null), 2, 0);
+ List<Integer> keys0 = primaryKeys(ignite0.cache(DEFAULT_CACHE_NAME), 2, 0);
+ List<Integer> keys1 = primaryKeys(ignite1.cache(DEFAULT_CACHE_NAME), 2, 0);
+ List<Integer> keys2 = primaryKeys(ignite2.cache(DEFAULT_CACHE_NAME), 2, 0);
LinkedHashMap<Integer, Integer> map = new LinkedHashMap<>();
@@ -1377,7 +1377,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
checkData(map, null, cache, 4);
- IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
+ IgniteCache<Integer, Integer> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
TestCommunicationSpi spi0 = (TestCommunicationSpi)ignite0.configuration().getCommunicationSpi();
@@ -1414,7 +1414,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testLockRemoveAfterClientFailed() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1431,7 +1431,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
assertTrue(ignite2.configuration().isClientMode());
- IgniteCache<Integer, Integer> cache2 = ignite2.cache(null);
+ IgniteCache<Integer, Integer> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
final Integer key = 0;
@@ -1441,11 +1441,11 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
ignite2.close();
- IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
+ IgniteCache<Integer, Integer> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
assertFalse(cache0.isLocalLocked(key, false));
- IgniteCache<Integer, Integer> cache1 = ignite1.cache(null);
+ IgniteCache<Integer, Integer> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
assertFalse(cache1.isLocalLocked(key, false));
@@ -1459,7 +1459,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
assertTrue(ignite2.configuration().isClientMode());
- cache2 = ignite2.cache(null);
+ cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
lock2 = cache2.lock(0);
@@ -1472,7 +1472,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testLockFromClientBlocksExchange() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1487,7 +1487,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
Ignite ignite2 = startGrid(2);
- IgniteCache<Integer, Integer> cache = ignite2.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite2.cache(DEFAULT_CACHE_NAME);
Lock lock = cache.lock(0);
@@ -1549,7 +1549,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
{
final List<Ignite> nodes = G.allGrids();
- final Affinity<Integer> aff = nodes.get(0).affinity(null);
+ final Affinity<Integer> aff = nodes.get(0).affinity(DEFAULT_CACHE_NAME);
assertEquals(expNodes, nodes.size());
@@ -1569,7 +1569,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
Object val = null;
for (Ignite node : nodes) {
- IgniteCache<Integer, Integer> cache = node.cache(null);
+ IgniteCache<Integer, Integer> cache = node.cache(DEFAULT_CACHE_NAME);
boolean affNode = aff.isPrimaryOrBackup(node.cluster().localNode(), key);
@@ -1581,7 +1581,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
else
assertNotNull("Unexpected value for " + node.name(), val0);
- GridCacheAdapter cache0 = ((IgniteKernal)node).internalCache(null);
+ GridCacheAdapter cache0 = ((IgniteKernal)node).internalCache(DEFAULT_CACHE_NAME);
if (affNode && cache0.isNear())
cache0 = ((GridNearCacheAdapter)cache0).dht();
@@ -1686,7 +1686,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
*/
private void multinode(CacheAtomicityMode atomicityMode, final TestType testType)
throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1734,7 +1734,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
Thread.currentThread().setName("update-thread-" + ignite.name());
- IgniteCache<Integer, Integer> cache = ignite.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
boolean useTx = testType == TestType.OPTIMISTIC_TX ||
testType == TestType.OPTIMISTIC_SERIALIZABLE_TX ||
@@ -1817,7 +1817,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
IgniteEx ignite = startGrid(SRV_CNT + CLIENT_CNT);
- IgniteCache<Integer, Integer> cache = ignite.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
assertNotNull(cache);
}
@@ -1904,14 +1904,14 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
fut.get(30_000);
if (testType != TestType.LOCK)
- checkData(null, putKeys, grid(SRV_CNT).cache(null), SRV_CNT + CLIENT_CNT);
+ checkData(null, putKeys, grid(SRV_CNT).cache(DEFAULT_CACHE_NAME), SRV_CNT + CLIENT_CNT);
}
/**
* @throws Exception If failed.
*/
public void testServersLeaveOnStart() throws Exception {
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
@@ -1957,7 +1957,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
for (int i = 0; i < CLIENTS; i++) {
Ignite ignite = grid(i + 2);
- IgniteCache<Integer, Integer> cache = ignite.cache(null);
+ IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
cache.put(i, i);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java
index 56a0acc..cdb6913 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java
@@ -63,7 +63,7 @@ public class IgniteCacheClientNodeConcurrentStart extends GridCommonAbstractTest
cfg.setClientMode(client);
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setBackups(0);
ccfg.setRebalanceMode(SYNC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
index d07398d..0885b1a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
@@ -76,7 +76,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
cfg.setClientMode(client);
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
cfg.setCacheConfiguration(ccfg);
@@ -114,7 +114,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
GridTestUtils.assertThrows(log, new Callable<Void>() {
@Override public Void call() throws Exception {
- ignite1.cache(null).get(1);
+ ignite1.cache(DEFAULT_CACHE_NAME).get(1);
return null;
}
@@ -122,7 +122,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
GridTestUtils.assertThrows(log, new Callable<Void>() {
@Override public Void call() throws Exception {
- ignite2.cache(null).get(1);
+ ignite2.cache(DEFAULT_CACHE_NAME).get(1);
return null;
}
@@ -134,7 +134,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
GridTestUtils.assertThrows(log, new Callable<Void>() {
@Override public Void call() throws Exception {
- ignite2.cache(null).get(1);
+ ignite2.cache(DEFAULT_CACHE_NAME).get(1);
return null;
}
@@ -427,12 +427,12 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
Ignite ignite0 = it.next();
- Affinity<Integer> aff0 = ignite0.affinity(null);
+ Affinity<Integer> aff0 = ignite0.affinity(DEFAULT_CACHE_NAME);
while (it.hasNext()) {
Ignite ignite = it.next();
- Affinity<Integer> aff = ignite.affinity(null);
+ Affinity<Integer> aff = ignite.affinity(DEFAULT_CACHE_NAME);
assertEquals(aff0.partitions(), aff.partitions());
@@ -498,7 +498,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
final String CACHE_NAME1 = "cache1";
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(CACHE_NAME1);
@@ -577,7 +577,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
final String CACHE_NAME2 = "cache2";
- ccfg = new CacheConfiguration();
+ ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(CACHE_NAME2);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java
index bdff0f2..ced1a7d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java
@@ -69,7 +69,7 @@ public class IgniteCacheClientReconnectTest extends GridCommonAbstractTest {
CacheConfiguration[] ccfgs = new CacheConfiguration[CACHES];
for (int i = 0; i < CACHES; i++) {
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(TRANSACTIONAL);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java
index 7c454e6..5578640 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java
@@ -191,7 +191,7 @@ public class IgniteCacheConnectionRecoveryTest extends GridCommonAbstractTest {
* @return Configuration.
*/
private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode) {
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(name);
ccfg.setAtomicityMode(atomicityMode);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
index 40440e0..c754b38 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
@@ -72,7 +72,7 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest {
cfg.setMarshaller(marsh);
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName("cache*");
ccfg.setCacheMode(PARTITIONED);
@@ -198,7 +198,7 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest {
while (System.currentTimeMillis() < stopTime) {
String cacheName = "dynamic-cache-" + nodeIdx;
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(cacheName);
@@ -240,7 +240,7 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest {
* @return Cache configuration.
*/
private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode) {
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(name);
ccfg.setCacheMode(REPLICATED);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java
index 69d9123..d0c380e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java
@@ -269,7 +269,7 @@ public class IgniteCacheGetRestartTest extends GridCommonAbstractTest {
* @return Cache configuration.
*/
private CacheConfiguration<Object, Object> cacheConfiguration(CacheMode cacheMode, int backups, boolean near) {
- CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(cacheMode);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
index c12852a..a0be40e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
@@ -89,7 +89,7 @@ public class IgniteCacheManyClientsTest extends GridCommonAbstractTest {
cfg.setClientMode(client);
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(ATOMIC);
@@ -166,7 +166,7 @@ public class IgniteCacheManyClientsTest extends GridCommonAbstractTest {
clients.add(ignite);
- IgniteCache<Object, Object> cache = ignite.cache(null);
+ IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME);
Integer key = rnd.nextInt(0, 1000);
@@ -241,7 +241,7 @@ public class IgniteCacheManyClientsTest extends GridCommonAbstractTest {
assertTrue(ignite.configuration().isClientMode());
- IgniteCache<Object, Object> cache = ignite.cache(null);
+ IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME);
ThreadLocalRandom rnd = ThreadLocalRandom.current();
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
index d25b798..f80985d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
@@ -103,7 +103,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
GridTestUtils.retryAssert(log, 10, 500, new CA() {
@Override public void apply() {
- assertTrue(grid.internalCache().context().mvcc().atomicFutures().isEmpty());
+ assertTrue(grid.internalCache(DEFAULT_CACHE_NAME).context().mvcc().atomicFutures().isEmpty());
}
});
}
@@ -115,7 +115,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
public void testMessageRecovery() throws Exception {
final Ignite ignite = grid(0);
- final IgniteCache<Object, String> cache = ignite.cache(null);
+ final IgniteCache<Object, String> cache = ignite.cache(DEFAULT_CACHE_NAME);
Map<Integer, String> map = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java
index 10bb3c1..25cb400 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java
@@ -107,7 +107,7 @@ public class IgniteCacheMessageRecoveryIdleConnectionTest extends GridCommonAbst
* @throws Exception If failed.
*/
private void cacheOperationsIdleConnectionClose(CacheAtomicityMode atomicityMode) throws Exception {
- CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg.setAtomicityMode(atomicityMode);
ccfg.setCacheMode(REPLICATED);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java
index 907922c..79f15ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java
@@ -97,7 +97,7 @@ public class IgniteCacheNearRestartRollbackSelfTest extends GridCommonAbstractTe
* @return Cache configuration.
*/
protected CacheConfiguration<Object, Object> cacheConfiguration(String igniteInstanceName) {
- CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
@@ -205,7 +205,7 @@ public class IgniteCacheNearRestartRollbackSelfTest extends GridCommonAbstractTe
boolean rollback,
Set<Integer> keys
) {
- final IgniteCache<Integer, Integer> cache = ignite.cache(null);
+ final IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
if (rollback) {
while (true) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
index df70778..4faf76b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
@@ -61,13 +61,13 @@ public class IgniteCachePrimarySyncTest extends GridCommonAbstractTest {
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
- CacheConfiguration<Object, Object> ccfg1 = new CacheConfiguration<>();
+ CacheConfiguration<Object, Object> ccfg1 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg1.setName("cache1");
ccfg1.setAtomicityMode(ATOMIC);
ccfg1.setBackups(2);
ccfg1.setWriteSynchronizationMode(PRIMARY_SYNC);
- CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>();
+ CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg2.setName("cache2");
ccfg2.setAtomicityMode(TRANSACTIONAL);
ccfg2.setBackups(2);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
index 42de613..1433daa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
@@ -386,7 +386,7 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
CacheAtomicityMode atomicityMode,
int backups,
boolean nearEnabled) {
- CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(cacheMode);
ccfg.setAtomicityMode(atomicityMode);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java
index c47e867..0b5280d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java
@@ -48,20 +48,20 @@ public class IgniteCacheServerNodeConcurrentStart extends GridCommonAbstractTest
((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
- CacheConfiguration ccfg1 = new CacheConfiguration();
+ CacheConfiguration ccfg1 = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg1.setName("cache-1");
ccfg1.setCacheMode(REPLICATED);
ccfg1.setRebalanceMode(SYNC);
- CacheConfiguration ccfg2 = new CacheConfiguration();
+ CacheConfiguration ccfg2 = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg2.setName("cache-2");
ccfg2.setCacheMode(PARTITIONED);
ccfg2.setRebalanceMode(SYNC);
ccfg2.setBackups(2);
- CacheConfiguration ccfg3 = new CacheConfiguration();
+ CacheConfiguration ccfg3 = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg3.setName("cache-3");
ccfg3.setCacheMode(PARTITIONED);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
index 9d3f439..d8d5374 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
@@ -300,7 +300,7 @@ public class IgniteCacheSingleGetMessageTest extends GridCommonAbstractTest {
CacheAtomicityMode atomicityMode,
CacheWriteSynchronizationMode syncMode,
int backups) {
- CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>();
+ CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(cacheMode);
ccfg.setAtomicityMode(atomicityMode);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
index b61b0db..cd85950 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
@@ -51,7 +51,7 @@ public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest {
((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
- CacheConfiguration ccfg = new CacheConfiguration();
+ CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(ATOMIC);
@@ -84,7 +84,7 @@ public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest {
@Override public Object call() throws Exception {
int idx = cntr.getAndIncrement() % 2;
- IgniteCache<Object, Object> cache = ignite(idx).cache(null);
+ IgniteCache<Object, Object> cache = ignite(idx).cache(DEFAULT_CACHE_NAME);
long cntr = 0;
@@ -105,7 +105,7 @@ public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest {
Ignite node = startGrid(3);
- IgniteCache<Object, Object> cache = node.cache(null);
+ IgniteCache<Object, Object> cache = node.cache(DEFAULT_CACHE_NAME);
for (int j = 0; j < 100; j++)
assertTrue(cache.size() >= 0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java
index f821a45..e667c49 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java
@@ -56,7 +56,7 @@ public class IgniteCacheSystemTransactionsSelfTest extends GridCacheAbstractSelf
/** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
- for (String cacheName : new String[] {null, CU.UTILITY_CACHE_NAME}) {
+ for (String cacheName : new String[] {DEFAULT_CACHE_NAME, CU.UTILITY_CACHE_NAME}) {
IgniteKernal kernal = (IgniteKernal)ignite(0);
GridCacheAdapter<Object, Object> cache = kernal.context().cache().internalCache(cacheName);
@@ -71,7 +71,7 @@ public class IgniteCacheSystemTransactionsSelfTest extends GridCacheAbstractSelf
public void testSystemTxInsideUserTx() throws Exception {
IgniteKernal ignite = (IgniteKernal)grid(0);
- IgniteCache<Object, Object> jcache = ignite.cache(null);
+ IgniteCache<Object, Object> jcache = ignite.cache(DEFAULT_CACHE_NAME);
try (Transaction tx = ignite.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
jcache.get("1");
@@ -98,7 +98,7 @@ public class IgniteCacheSystemTransactionsSelfTest extends GridCacheAbstractSelf
checkTransactionsCommitted();
- checkEntries(null, "1", "11", "2", "22", "3", null);
+ checkEntries(DEFAULT_CACHE_NAME, "1", "11", "2", "22", "3", null);
checkEntries(CU.UTILITY_CACHE_NAME, "1", null, "2", "2", "3", "3");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java
index 4357ae7..1d92376 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java
@@ -87,7 +87,7 @@ public abstract class IgniteNoClassOnServerAbstractTest extends GridCommonAbstra
}
try (Ignite ignite = Ignition.start(createConfiguration())) {
- CacheConfiguration cfg = new CacheConfiguration();
+ CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
cfg.setCopyOnRead(true); // To store only value bytes.