ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [11/20] ignite git commit: IGNITE-3488: Prohibited null as cache name. This closes #1790.
Date Wed, 26 Apr 2017 14:52:24 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java
index e0fc205..9ec48cf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java
@@ -158,7 +158,7 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest {
 
         cfg.setClientMode(clientMode);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(CacheMode.REPLICATED);
 
@@ -221,14 +221,14 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest {
 
             IgniteEx client = startGrid(idx);
 
-            client.cache(null).withKeepBinary().query(qry);
+            client.cache(DEFAULT_CACHE_NAME).withKeepBinary().query(qry);
         }
         else {
             applyDiscoveryHook = false;
 
             IgniteEx client = startGrid(idx);
 
-            client.cache(null).withKeepBinary().query(qry);
+            client.cache(DEFAULT_CACHE_NAME).withKeepBinary().query(qry);
         }
     }
 
@@ -292,7 +292,7 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest {
 
         IgniteEx ignite0 = grid(0);
 
-        IgniteCache<Object, Object> cache0 = ignite0.cache(null);
+        IgniteCache<Object, Object> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
 
         int cacheEntries = cache0.size(CachePeekMode.PRIMARY);
 
@@ -564,7 +564,7 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest {
         @Override public Object call() throws Exception {
             START_LATCH.await();
 
-            IgniteCache<Object, Object> cache = ignite.cache(null).withKeepBinary();
+            IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
             while (!updatesQueue.isEmpty()) {
                 BinaryUpdateDescription desc = updatesQueue.poll();

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
index bc9214f..8a2d0bf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
@@ -100,7 +100,7 @@ public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest {
             TestInterceptor1.onBeforePut = 0;
             TestInterceptor1.onGet = 0;
 
-            IgniteCache cache = ignite(0).cache(null).withKeepBinary();
+            IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
             cache.put(new TestKey(1), new TestValue(10));
 
@@ -151,7 +151,7 @@ public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest {
             TestInterceptor2.onBeforePut = 0;
             TestInterceptor2.onGet = 0;
 
-            IgniteCache cache = ignite(0).cache(null).withKeepBinary();
+            IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
             cache.put(1, 10);
 
@@ -195,7 +195,7 @@ public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest {
      * @return Cache configuration.
      */
     private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, boolean testPrimitives) {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setInterceptor(testPrimitives ? new TestInterceptor2() : new TestInterceptor1());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
index c542bd6..596cf54 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
@@ -30,7 +30,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest
     extends GridCacheAtomicEntryProcessorDeploymentSelfTest {
     /** {@inheritDoc} */
     protected IgniteCache getCache() {
-        return grid(1).cache(null).withKeepBinary();
+        return grid(1).cache(DEFAULT_CACHE_NAME).withKeepBinary();
     }
 
     /** {@inheritDoc} */
@@ -90,8 +90,8 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest
             assertTrue(grid(1).configuration().isClientMode());
             assertFalse(grid(0).configuration().isClientMode());
 
-            IgniteCache cache1 = grid(1).cache(null);
-            IgniteCache cache0 = grid(0).cache(null);
+            IgniteCache cache1 = grid(1).cache(DEFAULT_CACHE_NAME);
+            IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME);
 
             if (withKeepBinary) {
                 cache1 = cache1.withKeepBinary();

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java
index 2dcfab8..9370e27 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java
@@ -96,7 +96,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
 
         cfg.setClientMode(clientMode);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(CacheMode.REPLICATED);
 
@@ -244,7 +244,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
                     // No-op.
                 }
 
-                Object fieldVal = ((BinaryObject) ignite2.cache(null).withKeepBinary().get(1)).field("f1");
+                Object fieldVal = ((BinaryObject) ignite2.cache(DEFAULT_CACHE_NAME).withKeepBinary().get(1)).field("f1");
 
                 return fieldVal;
             }
@@ -272,7 +272,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
             }
         }).get();
 
-        int fld = ((BinaryObject) ignite0.cache(null).withKeepBinary().get(1)).field(intFieldName);
+        int fld = ((BinaryObject) ignite0.cache(DEFAULT_CACHE_NAME).withKeepBinary().get(1)).field(intFieldName);
 
         assertEquals(fld, 101);
 
@@ -286,7 +286,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
             }
         }).get();
 
-        assertEquals(((BinaryObject)ignite1.cache(null).withKeepBinary().get(2)).field(strFieldName), "str");
+        assertEquals(((BinaryObject)ignite1.cache(DEFAULT_CACHE_NAME).withKeepBinary().get(2)).field(strFieldName), "str");
     }
 
     /**
@@ -317,7 +317,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
 
         String res = client.compute(clientGrp).call(new IgniteCallable<String>() {
             @Override public String call() throws Exception {
-                return ((BinaryObject)client.cache(null).withKeepBinary().get(1)).field("f2");
+                return ((BinaryObject)client.cache(DEFAULT_CACHE_NAME).withKeepBinary().get(1)).field("f2");
             }
         });
 
@@ -349,7 +349,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
 
         client.compute(clientGrp).call(new IgniteCallable<String>() {
             @Override public String call() throws Exception {
-                return ((BinaryObject)client.cache(null).withKeepBinary().get(0)).field("f2");
+                return ((BinaryObject)client.cache(DEFAULT_CACHE_NAME).withKeepBinary().get(0)).field("f2");
             }
         });
 
@@ -436,7 +436,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
     private void addIntField(Ignite ignite, String fieldName, int fieldVal, int cacheIdx) {
         BinaryObjectBuilder builder = ignite.binary().builder(BINARY_TYPE_NAME);
 
-        IgniteCache<Object, Object> cache = ignite.cache(null).withKeepBinary();
+        IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
         builder.setField(fieldName, fieldVal);
 
@@ -454,7 +454,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm
     private void addStringField(Ignite ignite, String fieldName, String fieldVal, int cacheIdx) {
         BinaryObjectBuilder builder = ignite.binary().builder(BINARY_TYPE_NAME);
 
-        IgniteCache<Object, Object> cache = ignite.cache(null).withKeepBinary();
+        IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
         builder.setField(fieldName, fieldVal);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java
index 976dd01..40d8d04 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java
@@ -165,8 +165,8 @@ public class GridCacheBinaryObjectUserClassloaderSelfTest extends GridCommonAbst
             Ignite i1 = startGrid(1);
             Ignite i2 = startGrid(2);
 
-            IgniteCache<Integer, Object> cache1 = i1.cache(null);
-            IgniteCache<Integer, Object> cache2 = i2.cache(null);
+            IgniteCache<Integer, Object> cache1 = i1.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<Integer, Object> cache2 = i2.cache(DEFAULT_CACHE_NAME);
 
             ClassLoader ldr = useWrappingLoader ?
                 ((WrappingClassLoader)i1.configuration().getClassLoader()).getParent() :

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java
index e11342f..3ad1ec8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java
@@ -53,7 +53,7 @@ public abstract class GridCacheBinaryObjectsAbstractDataStreamerSelfTest extends
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        CacheConfiguration cacheCfg = new CacheConfiguration();
+        CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cacheCfg.setCacheMode(cacheMode());
         cacheCfg.setAtomicityMode(atomicityMode());
@@ -121,7 +121,7 @@ public abstract class GridCacheBinaryObjectsAbstractDataStreamerSelfTest extends
 
         final LongAdder8 cnt = new LongAdder8();
 
-        try (IgniteDataStreamer<Object, Object> ldr = grid(0).dataStreamer(null)) {
+        try (IgniteDataStreamer<Object, Object> ldr = grid(0).dataStreamer(DEFAULT_CACHE_NAME)) {
             IgniteInternalFuture<?> f = multithreadedAsync(
                 new Callable<Object>() {
                     @Override public Object call() throws Exception {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java
index ad78bad..f1e9dd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java
@@ -67,7 +67,7 @@ public abstract class GridCacheBinaryObjectsAbstractMultiThreadedSelfTest extend
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
 
-        CacheConfiguration cacheCfg = new CacheConfiguration();
+        CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cacheCfg.setCacheMode(cacheMode());
         cacheCfg.setAtomicityMode(atomicityMode());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
index a327dcb..6936da5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
@@ -145,7 +145,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
      */
     @SuppressWarnings("unchecked")
     private CacheConfiguration createCacheConfig() {
-        CacheConfiguration cacheCfg = new CacheConfiguration();
+        CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cacheCfg.setCacheMode(cacheMode());
         cacheCfg.setAtomicityMode(atomicityMode());
@@ -173,7 +173,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         for (int i = 0; i < gridCount(); i++) {
-            GridCacheAdapter<Object, Object> c = ((IgniteKernal)grid(i)).internalCache();
+            GridCacheAdapter<Object, Object> c = ((IgniteKernal)grid(i)).internalCache(DEFAULT_CACHE_NAME);
 
             for (GridCacheEntryEx e : c.map().entries()) {
                 Object key = e.key().value(c.context().cacheObjectContext(), false);
@@ -1007,7 +1007,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
         if (atomicityMode() != TRANSACTIONAL)
             return;
 
-        IgniteCache<Integer, TestObject> cache = ignite(0).cache(null);
+        IgniteCache<Integer, TestObject> cache = ignite(0).cache(DEFAULT_CACHE_NAME);
 
         cache.put(0, new TestObject(1));
 
@@ -1100,7 +1100,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
      * @return Cache with keep binary flag.
      */
     private <K, V> IgniteCache<K, V> keepBinaryCache() {
-        return ignite(0).cache(null).withKeepBinary();
+        return ignite(0).cache(DEFAULT_CACHE_NAME).withKeepBinary();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
index 7b5ecc2..b505f38 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
@@ -67,7 +67,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs
 
         cfg.setMarshaller(new BinaryMarshaller());
 
-        CacheConfiguration cacheCfg = new CacheConfiguration();
+        CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cacheCfg.setCacheStoreFactory(singletonFactory(STORE));
         cacheCfg.setStoreKeepBinary(keepBinaryInStore());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
index b337614..313aaf9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
@@ -65,7 +65,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
 
         cfg.setMarshaller(new BinaryMarshaller());
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
 
@@ -101,7 +101,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
                 @Override public Object call() throws Exception {
                     IgniteBinary binaries = ignite(0).binary();
 
-                    IgniteCache<Object, Object> cache = ignite(0).cache(null).withKeepBinary();
+                    IgniteCache<Object, Object> cache = ignite(0).cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
                     ThreadLocalRandom rnd = ThreadLocalRandom.current();
 
@@ -186,7 +186,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
 
         IgniteBinary binaries = ignite(0).binary();
 
-        IgniteCache<Object, Object> cache = ignite(0).cache(null).withKeepBinary();
+        IgniteCache<Object, Object> cache = ignite(0).cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
         for (int i = 0; i < 1000; i++) {
             BinaryObjectBuilder builder = binaries.builder("type-" + i);
@@ -282,7 +282,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
 
         IgniteBinary binaries = ignite(1).binary();
 
-        IgniteCache<Object, Object> cache = ignite(1).cache(null).withKeepBinary();
+        IgniteCache<Object, Object> cache = ignite(1).cache(DEFAULT_CACHE_NAME).withKeepBinary();
 
         for (int i = 0; i < 100; i++) {
             BinaryObjectBuilder builder = binaries.builder("type-" + i);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java
index 93b769b..0316edc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java
@@ -103,8 +103,8 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra
 
         assertFalse(ignite1.configuration().isClientMode());
 
-        Affinity<Object> aff0 = ignite0.affinity(null);
-        Affinity<Object> aff1 = ignite1.affinity(null);
+        Affinity<Object> aff0 = ignite0.affinity(DEFAULT_CACHE_NAME);
+        Affinity<Object> aff1 = ignite1.affinity(DEFAULT_CACHE_NAME);
 
         for (int i = 0 ; i < 100; i++) {
             TestObject1 obj1 = new TestObject1(i, i + 1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java
index a7346c9..c629871 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java
@@ -110,7 +110,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
 
             Ignite g0 = grid(0);
 
-            IgniteDataStreamer<Integer, String> dataLdr = g0.dataStreamer(null);
+            IgniteDataStreamer<Integer, String> dataLdr = g0.dataStreamer(DEFAULT_CACHE_NAME);
 
             Map<Integer, String> map = U.newHashMap(KEYS_COUNT);
 
@@ -128,7 +128,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
             // Check several random keys in cache.
             Random rnd = new Random();
 
-            IgniteCache<Integer, String> c0 = g0.cache(null);
+            IgniteCache<Integer, String> c0 = g0.cache(DEFAULT_CACHE_NAME);
 
             for (int i = 0; i < 100; i ++) {
                 Integer k = rnd.nextInt(KEYS_COUNT);
@@ -158,7 +158,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
 
             Ignite g0 = grid(0);
 
-            IgniteDataStreamer<Integer, TestObject2> dataLdr = g0.dataStreamer(null);
+            IgniteDataStreamer<Integer, TestObject2> dataLdr = g0.dataStreamer(DEFAULT_CACHE_NAME);
 
             dataLdr.perNodeBufferSize(1);
             dataLdr.autoFlushFrequency(1L);
@@ -193,7 +193,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
 
             Ignite g0 = grid(0);
 
-            IgniteDataStreamer<Integer, TestObject> dataLdr = g0.dataStreamer(null);
+            IgniteDataStreamer<Integer, TestObject> dataLdr = g0.dataStreamer(DEFAULT_CACHE_NAME);
 
             Map<Integer, TestObject> map = U.newHashMap(KEYS_COUNT);
 
@@ -211,7 +211,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
             // Read random keys. Take values as TestObject.
             Random rnd = new Random();
 
-            IgniteCache<Integer, TestObject> c = g0.cache(null);
+            IgniteCache<Integer, TestObject> c = g0.cache(DEFAULT_CACHE_NAME);
 
             for (int i = 0; i < 100; i ++) {
                 Integer k = rnd.nextInt(KEYS_COUNT);
@@ -252,7 +252,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
 
             Ignite g0 = grid(0);
 
-            IgniteDataStreamer<Integer, BinaryObject> dataLdr = g0.dataStreamer(null);
+            IgniteDataStreamer<Integer, BinaryObject> dataLdr = g0.dataStreamer(DEFAULT_CACHE_NAME);
 
             for (int i = 0; i < 500; i++) {
                 BinaryObjectBuilder obj = g0.binary().builder("NoExistedClass");
@@ -265,8 +265,8 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
 
             dataLdr.close(false);
 
-            assertEquals(500, g0.cache(null).size(CachePeekMode.ALL));
-            assertEquals(500, grid(1).cache(null).size(CachePeekMode.ALL));
+            assertEquals(500, g0.cache(DEFAULT_CACHE_NAME).size(CachePeekMode.ALL));
+            assertEquals(500, grid(1).cache(DEFAULT_CACHE_NAME).size(CachePeekMode.ALL));
         }
         finally {
             G.stopAll(true);
@@ -280,11 +280,11 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
      */
     private void checkDistribution(Ignite g) {
         ClusterNode n = g.cluster().localNode();
-        IgniteCache<Object, Object> c = g.cache(null);
+        IgniteCache<Object, Object> c = g.cache(DEFAULT_CACHE_NAME);
 
         // Check that data streamer correctly split data by nodes.
         for (int i = 0; i < KEYS_COUNT; i ++) {
-            if (g.affinity(null).isPrimary(n, i))
+            if (g.affinity(DEFAULT_CACHE_NAME).isPrimary(n, i))
                 assertNotNull(c.localPeek(i));
             else
                 assertNull(c.localPeek(i));

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
index 6948a68..10a5912 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
@@ -67,7 +67,7 @@ public abstract class IgniteCacheAbstractExecutionContextTest extends IgniteCach
 
         Object val = testClassLdr.loadClass(TEST_VALUE).newInstance();
 
-        IgniteCache<Object, Object> jcache = grid(0).cache(null);
+        IgniteCache<Object, Object> jcache = grid(0).cache(DEFAULT_CACHE_NAME);
 
         for (int i = 0; i < ITER_CNT; i++)
             jcache.put(i, val);
@@ -80,7 +80,7 @@ public abstract class IgniteCacheAbstractExecutionContextTest extends IgniteCach
                 assertEquals(testClassLdr, jcache.get(i).getClass().getClassLoader());
             else
                 assertEquals(grid(idx).configuration().getClassLoader(),
-                    grid(idx).cache(null).get(i).getClass().getClassLoader());
+                    grid(idx).cache(DEFAULT_CACHE_NAME).get(i).getClass().getClassLoader());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
index b38f07e..5656138 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
@@ -135,7 +135,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
 
         cfg.setAtomicConfiguration(atomicCfg);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setName(TRANSACTIONAL_CACHE_NAME);
         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/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
index b82da58..ab04503 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
@@ -144,7 +144,7 @@ public abstract class GridCacheAtomicReferenceApiSelfAbstractTest extends Ignite
     public void testIsolation() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("myCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
index 81300e4..b52c913 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
@@ -134,7 +134,7 @@ public abstract class GridCacheAtomicStampedApiSelfAbstractTest extends IgniteAt
     public void testIsolation() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("MyCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
index 3e7eff9..d4604fe 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
@@ -784,7 +784,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
     public void testIsolation() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("myCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
index 725b226..654e729 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
@@ -105,7 +105,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
 
         stopGrid(killGridName);
 
-        assertNull(((IgniteKernal)grid).cache(null).dataStructures().queue(QUEUE_NAME1, 0, false, false));
+        assertNull(((IgniteKernal)grid).cache(DEFAULT_CACHE_NAME).dataStructures().queue(QUEUE_NAME1, 0, false, false));
 
         final AtomicBoolean stop = new AtomicBoolean(false);
 
@@ -126,8 +126,8 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
         fut1.get();
         fut2.get();
 
-        ((IgniteKernal)grid).cache(null).dataStructures().removeQueue(QUEUE_NAME1);
-        ((IgniteKernal)grid).cache(null).dataStructures().removeQueue(QUEUE_NAME2);
+        ((IgniteKernal)grid).cache(DEFAULT_CACHE_NAME).dataStructures().removeQueue(QUEUE_NAME1);
+        ((IgniteKernal)grid).cache(DEFAULT_CACHE_NAME).dataStructures().removeQueue(QUEUE_NAME2);
 
         assertTrue(GridTestUtils.waitForCondition(new PAX() {
             @Override public boolean applyx() {
@@ -136,7 +136,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
                         continue;
 
                     Iterator<GridCacheEntryEx<Object, Object>> entries =
-                        ((GridKernal)grid(i)).context().cache().internalCache().map().allEntries0().iterator();
+                        ((GridKernal)grid(i)).context().cache().internalCache(DEFAULT_CACHE_NAME).map().allEntries0().iterator();
 
                     if (entries.hasNext()) {
                         log.info("Found cache entries, will wait: " + entries.next());
@@ -152,7 +152,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
         startGrid(killGridName);
 
         // Create queue again.
-        queue = ((IgniteKernal)grid).cache(null).dataStructures().queue(QUEUE_NAME1, 0, false, true);
+        queue = ((IgniteKernal)grid).cache(DEFAULT_CACHE_NAME).dataStructures().queue(QUEUE_NAME1, 0, false, true);
         */
 
         assertEquals(0, queue.size());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
index 6439eab..62d7097 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
@@ -79,7 +79,7 @@ public abstract class GridCacheSequenceApiSelfAbstractTest extends IgniteAtomics
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setName(TRANSACTIONAL_CACHE_NAME);
         ccfg.setCacheMode(PARTITIONED);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
index 5ccb830..517a7ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
@@ -963,7 +963,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
 
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("myCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
index e6e09c7..1e11c06 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
@@ -175,7 +175,7 @@ public abstract class GridCacheSetFailoverAbstractSelfTest extends IgniteCollect
 
             for (int i = 0; i < gridCount(); i++) {
                 Iterator<GridCacheMapEntry> entries =
-                    grid(i).context().cache().internalCache().map().entries().iterator();
+                    grid(i).context().cache().internalCache(DEFAULT_CACHE_NAME).map().entries().iterator();
 
                 while (entries.hasNext()) {
                     GridCacheEntryEx entry = entries.next();

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
index 2d19583..fc683f0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
@@ -47,7 +47,7 @@ public abstract class IgniteAtomicLongApiAbstractSelfTest extends IgniteAtomicsA
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setName(TRANSACTIONAL_CACHE_NAME);
         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/datastructures/IgniteCountDownLatchAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
index 4714acf..6f3ec2d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
@@ -89,7 +89,7 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics
     public void testIsolation() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("myCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
index cccb8ab..9e11b2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
@@ -124,7 +124,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
     public void testIsolation() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("myCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java
index c39fdb0..77fcce9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java
@@ -106,7 +106,7 @@ public abstract class IgniteSemaphoreAbstractSelfTest extends IgniteAtomicsAbstr
     public void testIsolation() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setName("myCache");
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java
index 3de2ee9..19f97bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java
@@ -126,7 +126,7 @@ public class GridCachePartitionedAtomicSequenceTxSelfTest extends GridCommonAbst
     public void testIsolation() {
         IgniteAtomicSequence seq = ignite(0).atomicSequence(SEQ_NAME, 0, true);
 
-        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
         ccfg.setAtomicityMode(TRANSACTIONAL);
 
         IgniteCache<Object, Object> cache = ignite(0).getOrCreateCache(ccfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
index 726f0fe..bfb7e28 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
@@ -160,14 +160,14 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
         for (int i = INIT_GRID_NUM; i < MAX_GRID_NUM; i++) {
             startGrid(i);
 
-            assert PARTITIONED == grid(i).cache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
+            assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode();
 
             try (Transaction tx = grid(i).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
-                Integer val = (Integer) grid(i).cache(null).get(key);
+                Integer val = (Integer) grid(i).cache(DEFAULT_CACHE_NAME).get(key);
 
                 assertEquals("Simple check failed for node: " + i, (Integer) i, val);
 
-                grid(i).cache(null).put(key, i + 1);
+                grid(i).cache(DEFAULT_CACHE_NAME).put(key, i + 1);
 
                 tx.commit();
             }
@@ -185,12 +185,12 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
         for (int i = INIT_GRID_NUM; i < 20; i++) {
             startGrid(i);
 
-            assert PARTITIONED == grid(i).cache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
+            assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode();
 
             try (Transaction tx = grid(i).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                 GridCacheInternalKey key = new GridCacheInternalKeyImpl(name);
 
-                GridCacheAtomicLongValue atomicVal = ((GridCacheAtomicLongValue) grid(i).cache(null).get(key));
+                GridCacheAtomicLongValue atomicVal = ((GridCacheAtomicLongValue) grid(i).cache(DEFAULT_CACHE_NAME).get(key));
 
                 assertNotNull(atomicVal);
 
@@ -198,7 +198,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
 
                 atomicVal.set(i + 1);
 
-                grid(i).cache(null).put(key, atomicVal);
+                grid(i).cache(DEFAULT_CACHE_NAME).put(key, atomicVal);
 
                 tx.commit();
             }
@@ -216,7 +216,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
         for (int i = INIT_GRID_NUM; i < 20; i++) {
             startGrid(i);
 
-            assert PARTITIONED == grid(i).cache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
+            assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode();
 
             IgniteAtomicLong atomic = grid(i).atomicLong(name, 0, true);
 
@@ -241,13 +241,13 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
             assert startGrid(i) != null;
 
         for (int i = 0; i < INIT_GRID_NUM; i++)
-            assert PARTITIONED == grid(i).cache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
+            assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode();
 
         // Init cache data.
 
         try (Transaction tx = grid(0).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
             // Put simple value.
-            grid(0).cache(null).put(key, INIT_GRID_NUM);
+            grid(0).cache(DEFAULT_CACHE_NAME).put(key, INIT_GRID_NUM);
 
             tx.commit();
         }
@@ -264,13 +264,13 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
             assert startGrid(i) != null;
 
         for (int i = 0; i < INIT_GRID_NUM; i++)
-            assert PARTITIONED == grid(i).cache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
+            assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode();
 
         // Init cache data.
 
         try (Transaction tx = grid(0).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
             // Put custom data
-            grid(0).cache(null).put(new GridCacheInternalKeyImpl(key), new GridCacheAtomicLongValue(INIT_GRID_NUM));
+            grid(0).cache(DEFAULT_CACHE_NAME).put(new GridCacheInternalKeyImpl(key), new GridCacheAtomicLongValue(INIT_GRID_NUM));
 
             tx.commit();
         }
@@ -289,7 +289,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
             assert startGrid(i) != null;
 
         for (int i = 0; i < INIT_GRID_NUM; i++)
-            assert PARTITIONED == grid(i).cache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
+            assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode();
 
         // Init cache data.
         grid(0).atomicLong(key, 0, true).getAndSet(INIT_GRID_NUM);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
index cbfee5a..d77754f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
@@ -190,9 +190,9 @@ public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends IgniteColl
                     // If output presents, test passes with greater probability.
                     // info("Start puts.");
 
-                    IgniteCache<Integer, String> cache = ignite.cache(null);
+                    IgniteCache<Integer, String> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
-                    info("Partition: " + ignite.affinity(null).partition(1));
+                    info("Partition: " + ignite.affinity(DEFAULT_CACHE_NAME).partition(1));
 
                     try (Transaction tx = ignite.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         // info("Getting value for key 1");

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java
index f2ae9ce..f1377df 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java
@@ -111,7 +111,7 @@ public abstract class CacheAsyncOperationsFailoverAbstractTest extends GridCache
      * @throws Exception If failed.
      */
     public void testAsyncFailover() throws Exception {
-        IgniteCache<TestKey, TestValue> cache = ignite(0).cache(null);
+        IgniteCache<TestKey, TestValue> cache = ignite(0).cache(DEFAULT_CACHE_NAME);
 
         int ops = cache.getConfiguration(CacheConfiguration.class).getMaxConcurrentAsyncOperations();
 
@@ -225,7 +225,7 @@ public abstract class CacheAsyncOperationsFailoverAbstractTest extends GridCache
         });
 
         try {
-            final IgniteCache<TestKey, TestValue> cache = ignite(0).cache(null);
+            final IgniteCache<TestKey, TestValue> cache = ignite(0).cache(DEFAULT_CACHE_NAME);
 
             GridTestUtils.runMultiThreaded(new Callable<Object>() {
                 @Override public Object call() throws Exception {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java
index 06baa09..3b0dbb9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java
@@ -211,7 +211,7 @@ public class CacheAsyncOperationsTest extends GridCommonAbstractTest {
      * @return Cache configuration.
      */
     private CacheConfiguration<Integer, Integer> cacheConfiguration(CacheAtomicityMode atomicityMode) {
-        CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(PARTITIONED);
         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/CacheGetFutureHangsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
index 9ee8d69..1aec352 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
@@ -140,7 +140,7 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest {
                         Set<Integer> keys = F.asSet(1, 2, 3, 4, 5);
 
                         while ((ignite = randomNode()) != null) {
-                            IgniteCache<Object, Object> cache = ignite.get1().cache(null);
+                            IgniteCache<Object, Object> cache = ignite.get1().cache(DEFAULT_CACHE_NAME);
 
                             for (int i = 0; i < 100; i++)
                                 cache.containsKey(ThreadLocalRandom.current().nextInt(100_000));
@@ -164,7 +164,7 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest {
                         T2<Ignite, Integer> ignite;
 
                         while ((ignite = randomNode()) != null) {
-                            IgniteCache<Object, Object> cache = ignite.get1().cache(null);
+                            IgniteCache<Object, Object> cache = ignite.get1().cache(DEFAULT_CACHE_NAME);
 
                             for (int i = 0; i < 100; i++)
                                 cache.put(ThreadLocalRandom.current().nextInt(100_000), UUID.randomUUID());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java
index e8e997b..bb2a55d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java
@@ -106,7 +106,7 @@ public class CacheGetInsideLockChangingTopologyTest extends GridCommonAbstractTe
      * @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.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/CacheLateAffinityAssignmentTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
index 9c24073..f1cdb07 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
@@ -1422,7 +1422,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
                             cacheClosure(rnd, caches, cacheName, srvs, srvIdx);
                         }
                         else
-                            cacheClosure(rnd, caches, null, srvs, srvIdx);
+                            cacheClosure(rnd, caches, DEFAULT_CACHE_NAME, srvs, srvIdx);
 
                         startNode(srvName, ++topVer, false);
 
@@ -1468,7 +1468,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
                             cacheClosure(rnd, caches, cacheName, srvs, srvIdx);
                         }
                         else
-                            cacheClosure(rnd, caches, null, srvs, srvIdx);
+                            cacheClosure(rnd, caches, DEFAULT_CACHE_NAME, srvs, srvIdx);
 
                         startNode(clientName, ++topVer, true);
 
@@ -1573,7 +1573,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
 
         log.info("Start server: " + srvName);
 
-        cacheClosure(rnd, caches, null, srvs, srvIdx);
+        cacheClosure(rnd, caches, DEFAULT_CACHE_NAME, srvs, srvIdx);
 
         startNode(srvName, ++topVer, false);
 
@@ -1938,7 +1938,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
      * @param srvIdx Current servers index.
      */
     private void cacheClosure(Random rnd, List<String> caches, String cacheName, List<String> srvs, int srvIdx) {
-        if (cacheName != null) {
+        if (!DEFAULT_CACHE_NAME.equals(cacheName)) {
             final CacheConfiguration ccfg = randomCacheConfiguration(rnd, cacheName, srvs, srvIdx);
 
             cacheC = new IgniteClosure<String, CacheConfiguration[]>() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
index 48e4c79..4f1b090 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
@@ -83,7 +83,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
 
         ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(PARTITIONED);
 
@@ -128,7 +128,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
         try {
             IgniteInClosure<Ignite> f = new IgniteInClosure<Ignite>() {
                 @Override public void apply(Ignite grid) {
-                    try (IgniteDataStreamer<Integer, String> dataStreamer = grid.dataStreamer(null)) {
+                    try (IgniteDataStreamer<Integer, String> dataStreamer = grid.dataStreamer(DEFAULT_CACHE_NAME)) {
                         dataStreamer.allowOverwrite(allowOverwrite);
 
                         for (int i = 0; i < KEYS_CNT; i++)
@@ -154,7 +154,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
 
         loadCache(new IgniteInClosure<Ignite>() {
             @Override public void apply(Ignite grid) {
-                grid.cache(null).loadCache(null);
+                grid.cache(DEFAULT_CACHE_NAME).loadCache(null);
             }
         });
     }
@@ -261,7 +261,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
 
         IgniteInClosure<Ignite> f = new IgniteInClosure<Ignite>() {
             @Override public void apply(Ignite grid) {
-                try (IgniteDataStreamer<Integer, String> dataStreamer = grid.dataStreamer(null)) {
+                try (IgniteDataStreamer<Integer, String> dataStreamer = grid.dataStreamer(DEFAULT_CACHE_NAME)) {
                     dataStreamer.allowOverwrite(allowOverwrite);
 
                     for (int i = 0; i < KEYS_CNT; i++) {
@@ -286,7 +286,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
         for (IgniteFuture res : set)
             assertNull(res.get());
 
-        IgniteCache<Integer, String> cache = grid(0).cache(null);
+        IgniteCache<Integer, String> cache = grid(0).cache(DEFAULT_CACHE_NAME);
 
         long size = cache.size(CachePeekMode.PRIMARY);
 
@@ -303,11 +303,11 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
                         log.info("Missed key info:" +
                             igniteEx.localNode().id() +
                             " primary=" +
-                            ignite.affinity(null).isPrimary(igniteEx.localNode(), i) +
+                            ignite.affinity(DEFAULT_CACHE_NAME).isPrimary(igniteEx.localNode(), i) +
                             " backup=" +
-                            ignite.affinity(null).isBackup(igniteEx.localNode(), i) +
+                            ignite.affinity(DEFAULT_CACHE_NAME).isBackup(igniteEx.localNode(), i) +
                             " local peek=" +
-                            ignite.cache(null).localPeek(i, CachePeekMode.ONHEAP));
+                            ignite.cache(DEFAULT_CACHE_NAME).localPeek(i, CachePeekMode.ONHEAP));
                     }
 
                     for (int j = i; j < i + 10000; j++) {
@@ -353,7 +353,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     private void assertCacheSize() throws Exception {
-        final IgniteCache<Integer, String> cache = grid(0).cache(null);
+        final IgniteCache<Integer, String> cache = grid(0).cache(DEFAULT_CACHE_NAME);
 
         GridTestUtils.waitForCondition(new GridAbsPredicate() {
             @Override public boolean apply() {
@@ -371,7 +371,7 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT
         int total = 0;
 
         for (int i = 0; i < GRIDS_CNT; i++)
-            total += grid(i).cache(null).localSize(CachePeekMode.PRIMARY);
+            total += grid(i).cache(DEFAULT_CACHE_NAME).localSize(CachePeekMode.PRIMARY);
 
         assertEquals("Data lost.", KEYS_CNT, total);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
index 677a75d..947754f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
@@ -60,7 +60,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setAtomicityMode(TRANSACTIONAL);
 
@@ -90,11 +90,11 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
         final Ignite ignite0 = ignite(0);
         final Ignite ignite1 = ignite(1);
 
-        final Integer key = primaryKey(ignite1.cache(null));
+        final Integer key = primaryKey(ignite1.cache(DEFAULT_CACHE_NAME));
 
         IgniteInternalFuture<?> fut1 = GridTestUtils.runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                Lock lock = ignite0.cache(null).lock(key);
+                Lock lock = ignite0.cache(DEFAULT_CACHE_NAME).lock(key);
 
                 lock.lock();
 
@@ -106,7 +106,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         IgniteInternalFuture<?> fut2 = GridTestUtils.runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                Lock lock = ignite1.cache(null).lock(key);
+                Lock lock = ignite1.cache(DEFAULT_CACHE_NAME).lock(key);
 
                 log.info("Start lock.");
 
@@ -186,13 +186,13 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
         final Ignite ignite0 = ignite(0);
         final Ignite ignite1 = ignite(1);
 
-        final Integer key = primaryKey(ignite1.cache(null));
+        final Integer key = primaryKey(ignite1.cache(DEFAULT_CACHE_NAME));
 
         IgniteInternalFuture<?> fut1 = GridTestUtils.runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
                 Transaction tx = ignite0.transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
 
-                ignite0.cache(null).get(key);
+                ignite0.cache(DEFAULT_CACHE_NAME).get(key);
 
                 return null;
             }
@@ -205,7 +205,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
                 try (Transaction tx = ignite1.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                     log.info("Start tx lock.");
 
-                    ignite1.cache(null).get(key);
+                    ignite1.cache(DEFAULT_CACHE_NAME).get(key);
 
                     log.info("Tx locked key.");
 
@@ -233,7 +233,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         Ignite ignite1 = startGrid(1);
 
-        Lock lock = ignite1.cache(null).lock("key");
+        Lock lock = ignite1.cache(DEFAULT_CACHE_NAME).lock("key");
         lock.lock();
 
         IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Void>() {
@@ -266,7 +266,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         Ignite ignite2 = ignite(2);
 
-        lock = ignite2.cache(null).lock("key");
+        lock = ignite2.cache(DEFAULT_CACHE_NAME).lock("key");
         lock.lock();
         lock.unlock();
     }
@@ -281,7 +281,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         awaitPartitionMapExchange();
 
-        Lock lock = ignite1.cache(null).lock("key");
+        Lock lock = ignite1.cache(DEFAULT_CACHE_NAME).lock("key");
         lock.lock();
 
         IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Void>() {
@@ -300,7 +300,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         Ignite ignite2 = ignite(2);
 
-        lock = ignite2.cache(null).lock("key");
+        lock = ignite2.cache(DEFAULT_CACHE_NAME).lock("key");
         lock.lock();
         lock.unlock();
     }
@@ -313,7 +313,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         Ignite ignite1 = startGrid(1);
 
-        IgniteCache cache = ignite1.cache(null);
+        IgniteCache cache = ignite1.cache(DEFAULT_CACHE_NAME);
         ignite1.transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
         cache.get(1);
 
@@ -347,7 +347,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
 
         Ignite ignite2 = ignite(2);
 
-        cache = ignite2.cache(null);
+        cache = ignite2.cache(DEFAULT_CACHE_NAME);
 
         try (Transaction tx = ignite2.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
             cache.get(1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java
index 1e3f081..9a0fb03 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java
@@ -142,7 +142,7 @@ public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractS
         });
 
         try {
-            final IgniteCache<TestKey, TestValue> cache = ignite(0).cache(null);
+            final IgniteCache<TestKey, TestValue> cache = ignite(0).cache(DEFAULT_CACHE_NAME);
 
             GridTestUtils.runMultiThreaded(new Callable<Object>() {
                 @Override public Object call() throws Exception {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java
index 8e4dd3d..f2a9e5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java
@@ -55,7 +55,7 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest {
 
         cfg.setClientMode(client);
 
-        CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setAtomicityMode(TRANSACTIONAL);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
@@ -92,7 +92,7 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest {
 
         final Integer key = 1;
 
-        final IgniteCache<Integer, Integer> cache = client.cache(null);
+        final IgniteCache<Integer, Integer> cache = client.cache(DEFAULT_CACHE_NAME);
 
         final long stopTime = System.currentTimeMillis() + 30_000;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
index 6a61fbb..f96014e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
@@ -79,14 +79,14 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).cache(null).removeAll();
+        grid(0).cache(DEFAULT_CACHE_NAME).removeAll();
 
         for (int i = 0; i < GRID_CNT; i++) {
             Ignite g = grid(i);
 
-            IgniteCache<String, int[]> c = g.cache(null);
+            IgniteCache<String, int[]> c = g.cache(DEFAULT_CACHE_NAME);
 
-            GridCacheAdapter<Object, Object> cache = ((IgniteEx)g).context().cache().internalCache();
+            GridCacheAdapter<Object, Object> cache = ((IgniteEx)g).context().cache().internalCache(DEFAULT_CACHE_NAME);
 
             info("Node: " + g.cluster().localNode().id());
             info("Entries: " + cache.entries());
@@ -135,7 +135,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
 
         final String key = "TestKey";
 
-        info("Primary node for test key: " + grid(0).affinity(null).mapKeyToNode(key));
+        info("Primary node for test key: " + grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToNode(key));
 
         for (int i = 0; i < jobCnt; i++) {
             futs.add(ignite.compute().applyAsync(new CX1<Integer, Void>() {
@@ -143,7 +143,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
                 private Ignite ignite;
 
                 @Override public Void applyx(final Integer i) {
-                    IgniteCache<String, int[]> cache = ignite.cache(null);
+                    IgniteCache<String, int[]> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
                     try (Transaction tx = ignite.transactions().txStart(concur, isolation)) {
                         int[] arr = cache.get(key);
@@ -177,10 +177,10 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
             for (int g = 0; g < GRID_CNT; g++) {
                 info("Will check grid: " + g);
 
-                info("Value: " + grid(i).cache(null).localPeek(key));
+                info("Value: " + grid(i).cache(DEFAULT_CACHE_NAME).localPeek(key));
             }
 
-            IgniteCache<String, int[]> c = grid(i).cache(null);
+            IgniteCache<String, int[]> c = grid(i).cache(DEFAULT_CACHE_NAME);
 
             // Do within transaction to make sure that lock is acquired
             // which means that all previous transactions have committed.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
index 16ebf7e..4af2571 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
@@ -46,7 +46,7 @@ public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extend
 
     /** {@inheritDoc} */
     @Override protected CacheConfiguration cacheConfiguration0() {
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setCacheMode(PARTITIONED);
         cfg.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/GridCacheAbstractPrimarySyncSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
index 35057bb..7fafa3a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
@@ -48,7 +48,7 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(PARTITIONED);
         ccfg.setAtomicityMode(TRANSACTIONAL);
@@ -91,9 +91,9 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs
     public void testPrimarySync() throws Exception {
         for (int i = 0; i < GRID_CNT; i++) {
             for (int j = 0; j < GRID_CNT; j++) {
-                IgniteCache<Integer, Integer> cache = grid(j).cache(null);
+                IgniteCache<Integer, Integer> cache = grid(j).cache(DEFAULT_CACHE_NAME);
 
-                if (grid(j).affinity(null).isPrimary(grid(j).localNode(), i)) {
+                if (grid(j).affinity(DEFAULT_CACHE_NAME).isPrimary(grid(j).localNode(), i)) {
                     try (Transaction tx = grid(j).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         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/GridCacheBasicOpAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
index cd7e513..e4099ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
@@ -92,7 +92,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         for (Ignite g : G.allGrids())
-            g.cache(null).clear();
+            g.cache(DEFAULT_CACHE_NAME).clear();
     }
 
     /**
@@ -105,9 +105,9 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
         CacheEventListener lsnr = new CacheEventListener(latch);
 
         try {
-            IgniteCache<String, String> cache1 = ignite1.cache(null);
-            IgniteCache<String, String> cache2 = ignite2.cache(null);
-            IgniteCache<String, String> cache3 = ignite3.cache(null);
+            IgniteCache<String, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<String, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<String, String> cache3 = ignite3.cache(DEFAULT_CACHE_NAME);
 
             ignite1.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
             ignite2.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
@@ -180,9 +180,9 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
         CacheEventListener lsnr = new CacheEventListener(latch);
 
         try {
-            IgniteCache<String, String> cache1 = ignite1.cache(null);
-            IgniteCache<String, String> cache2 = ignite2.cache(null);
-            IgniteCache<String, String> cache3 = ignite3.cache(null);
+            IgniteCache<String, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<String, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<String, String> cache3 = ignite3.cache(DEFAULT_CACHE_NAME);
 
             ignite1.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
             ignite2.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
@@ -260,9 +260,9 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
         IgnitePredicate<Event> lsnr = new CacheEventListener(latch);
 
         try {
-            IgniteCache<String, String> cache1 = ignite1.cache(null);
-            IgniteCache<String, String> cache2 = ignite2.cache(null);
-            IgniteCache<String, String> cache3 = ignite3.cache(null);
+            IgniteCache<String, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<String, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
+            IgniteCache<String, String> cache3 = ignite3.cache(DEFAULT_CACHE_NAME);
 
             ignite1.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
             ignite2.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
@@ -329,9 +329,9 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
      * @throws Exception In case of error.
      */
     public void testPutWithExpiration() throws Exception {
-        IgniteCache<String, String> cache1 = ignite1.cache(null);
-        IgniteCache<String, String> cache2 = ignite2.cache(null);
-        IgniteCache<String, String> cache3 = ignite3.cache(null);
+        IgniteCache<String, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
+        IgniteCache<String, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
+        IgniteCache<String, String> cache3 = ignite3.cache(DEFAULT_CACHE_NAME);
 
         cache1.put("key", "val");
 


Mime
View raw message