ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [40/51] [abbrv] ignite git commit: IGNITE-3488: Prohibited null as cache name. This closes #1790.
Date Wed, 26 Apr 2017 17:38:49 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
index 44adc84..e32d8aa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
@@ -46,7 +46,7 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(PARTITIONED);
         ccfg.setBackups(1);
@@ -81,27 +81,27 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
         byte[] val = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
 
         for (int i = 0; i < keyCnt; i++)
-            grid(0).cache(null).put(String.valueOf(i), val);
+            grid(0).cache(DEFAULT_CACHE_NAME).put(String.valueOf(i), val);
 
         for (int i = 0; i < keyCnt; i++)
-            grid(0).cache(null).get(String.valueOf(i));
+            grid(0).cache(DEFAULT_CACHE_NAME).get(String.valueOf(i));
 
         startGrid(1);
 
 // TODO: GG-11148 check if evict/promote make sense.
 //        if (memMode == ONHEAP_TIERED) {
 //            for (int i = 0; i < keyCnt; i++)
-//                grid(0).cache(null).localEvict(Collections.<Object>singleton(String.valueOf(i)));
+//                grid(0).cache(DEFAULT_CACHE_NAME).localEvict(Collections.<Object>singleton(String.valueOf(i)));
 //
 //            for (int i = 0; i < keyCnt; i++)
-//                grid(0).cache(null).localPromote(Collections.singleton(String.valueOf(i)));
+//                grid(0).cache(DEFAULT_CACHE_NAME).localPromote(Collections.singleton(String.valueOf(i)));
 //        }
 
         startGrid(2);
 
         for (int g = 0; g < 3; g++) {
             for (int i = 0; i < keyCnt; i++) {
-                byte[] o = (byte[])grid(g).cache(null).get(String.valueOf(i));
+                byte[] o = (byte[])grid(g).cache(DEFAULT_CACHE_NAME).get(String.valueOf(i));
 
                 assertTrue("Got invalid value [val=" + Arrays.toString(val) + ", actual=" + Arrays.toString(o) + ']',
                     Arrays.equals(val, o));

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
index 8de9748..3c5fe0e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
@@ -115,7 +115,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
             for (int i = 0; i < keyCnt; i++) {
                 String key = "key" + i;
 
-                if (ignite(0).affinity(null).mapKeyToPrimaryAndBackups(key).contains(locNode)) {
+                if (ignite(0).affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(locNode)) {
                     info("Node is reported as affinity node for key [key=" + key + ", nodeId=" + locNode.id() + ']');
 
                     assertEquals((Integer)i, cache0.localPeek(key));
@@ -175,7 +175,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
             for (int i = 0; i < keyCnt; i++) {
                 String key = "key" + i;
 
-                if (ignite(0).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) {
+                if (ignite(0).affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode())) {
                     info("Node is reported as affinity node for key [key=" + key + ", nodeId=" + locNode.id() + ']');
 
                     assertEquals((Integer)i, cache0.localPeek(key));
@@ -240,7 +240,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
 
                     Ignite ignite = grid(g);
 
-                    IgniteCache<Object, Object> cache = ignite.cache(null);
+                    IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
                     log.info("Update thread: " + ignite.name());
 
@@ -305,7 +305,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
 
                     Ignite ignite = grid(g);
 
-                    IgniteCache<Object, Object> cache = ignite.cache(null);
+                    IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
                     int k = rnd.nextInt(range);
 
@@ -334,7 +334,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
         int present = 0;
         int absent = 0;
 
-        Affinity<Integer> aff = ignite(0).affinity(null);
+        Affinity<Integer> aff = ignite(0).affinity(DEFAULT_CACHE_NAME);
 
         boolean invalidVal = false;
 
@@ -344,7 +344,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
             for (int g = 0; g < gridCount(); g++) {
                 Ignite ignite = grid(g);
 
-                Long val = (Long)ignite.cache(null).localPeek(i);
+                Long val = (Long)ignite.cache(DEFAULT_CACHE_NAME).localPeek(i);
 
                 if (firstVal == null && val != null)
                     firstVal = val;
@@ -397,7 +397,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
             boolean primary = aff.isPrimary(ignite.cluster().localNode(), key);
             boolean backup = aff.isBackup(ignite.cluster().localNode(), key);
 
-            Object val = ignite.cache(null).localPeek(key);
+            Object val = ignite.cache(DEFAULT_CACHE_NAME).localPeek(key);
 
             log.error("Node value [key=" + key +
                 ", val=" + val +

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java
index abb1464..25817a1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java
@@ -130,7 +130,7 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest {
             @SuppressWarnings({"BusyWait"})
             @Override public void applyx() {
                 while (cnt++ < txCnt && !done.get()) {
-                    IgniteCache<Object, Object> cache = grid(0).cache(null);
+                    IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME);
 
                     if (cnt % logMod == 0)
                         info("Starting transaction: " + cnt);
@@ -177,7 +177,7 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest {
         GridFuture<?> debugFut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
             @SuppressWarnings({"UnusedDeclaration"})
             @Override public void run() {
-                Cache<Object, Object> cache = ((IgniteKernal)grid(0)).cache(null);
+                Cache<Object, Object> cache = ((IgniteKernal)grid(0)).cache(DEFAULT_CACHE_NAME);
 
                 try {
                     Thread.sleep(15000);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
index 1d602c9..0fd3fb9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
@@ -192,7 +192,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest {
         for (int i = 0; i < gridCount(); i++) {
             IgniteKernal grid = (IgniteKernal)grid(i);
 
-            GridCacheAdapter<Object, Object> cache = grid.context().cache().internalCache();
+            GridCacheAdapter<Object, Object> cache = grid.context().cache().internalCache(DEFAULT_CACHE_NAME);
 
             GridCacheEntryEx e;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
index 9101fc7..85963d2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
@@ -226,7 +226,7 @@ public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest {
         CacheAtomicityMode atomicityMode,
         AffinityFunction aff,
         int backups) {
-        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setBackups(backups);
         ccfg.setName(name);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
index 382e8c9..1e26fd2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
@@ -83,24 +83,24 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
 
     /** {@inheritDoc} */
     protected void beforeTest() throws Exception {
-        ignite.getOrCreateCache((String)null);
+        ignite.getOrCreateCache(DEFAULT_CACHE_NAME);
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        ignite.cache(null).destroy();
+        ignite.cache(DEFAULT_CACHE_NAME).destroy();
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testForDataNodes() throws Exception {
-        ClusterGroup grp = ignite.cluster().forDataNodes(null);
+        ClusterGroup grp = ignite.cluster().forDataNodes(DEFAULT_CACHE_NAME);
 
         assertFalse(grp.nodes().isEmpty());
 
         try {
-            daemon.cluster().forDataNodes(null);
+            daemon.cluster().forDataNodes(DEFAULT_CACHE_NAME);
         }
         catch (IllegalStateException ignored) {
             return;
@@ -113,12 +113,12 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testForClientNodes() throws Exception {
-        ClusterGroup grp = ignite.cluster().forClientNodes(null);
+        ClusterGroup grp = ignite.cluster().forClientNodes(DEFAULT_CACHE_NAME);
 
         assertTrue(grp.nodes().isEmpty());
 
         try {
-            daemon.cluster().forClientNodes(null);
+            daemon.cluster().forClientNodes(DEFAULT_CACHE_NAME);
         }
         catch (IllegalStateException ignored) {
             return;
@@ -131,12 +131,12 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testForCacheNodes() throws Exception {
-        ClusterGroup grp = ignite.cluster().forCacheNodes(null);
+        ClusterGroup grp = ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME);
 
         assertFalse(grp.nodes().isEmpty());
 
         try {
-            daemon.cluster().forCacheNodes(null);
+            daemon.cluster().forCacheNodes(DEFAULT_CACHE_NAME);
         }
         catch (IllegalStateException ignored) {
             return;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
index dc357f1..257ca77 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
@@ -51,6 +51,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
@@ -357,7 +358,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
      * @throws Exception In case of error.
      */
     @SuppressWarnings("unchecked")
-    private CacheConfiguration cacheConfiguration(@Nullable String cacheName) throws Exception {
+    private CacheConfiguration cacheConfiguration(@NotNull String cacheName) throws Exception {
         CacheConfiguration cfg = defaultCacheConfiguration();
 
         cfg.setCacheMode(cacheMode());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
index 5133f61..c5cb715 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
@@ -216,7 +216,7 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
      * @return Cache.
      */
     protected <K, V> IgniteCache<K, V> jcache(int idx) {
-        return grid(idx).cache(null);
+        return grid(idx).cache(DEFAULT_CACHE_NAME);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
index 17895c5..5aef9a8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
@@ -82,7 +82,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
      * @return Cache configuration.
      */
     private CacheConfiguration<Integer, TestValue> cacheConfiguration(CacheMode cacheMode, CacheAtomicityMode atomicityMode) {
-        CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(cacheMode);
         ccfg.setAtomicityMode(atomicityMode);
@@ -152,7 +152,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
             }
 
             for (int g = 0; g < NODES; g++) {
-                IgniteCache<Integer, TestValue> nodeCache = ignite(g).cache(null);
+                IgniteCache<Integer, TestValue> nodeCache = ignite(g).cache(DEFAULT_CACHE_NAME);
                 IgniteCache<Integer, BinaryObject> nodeBinaryCache = nodeCache.withKeepBinary();
 
                 for (int i = 0; i < 100; i++) {
@@ -172,7 +172,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
             }
         }
         finally {
-            client.destroyCache(null);
+            client.destroyCache(DEFAULT_CACHE_NAME);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
index b5ca684..c1af11e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
@@ -39,7 +39,7 @@ public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstr
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
 
-        CacheConfiguration templateCfg = new CacheConfiguration();
+        CacheConfiguration templateCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         templateCfg.setName("org.apache.ignite.template*");
         templateCfg.setBackups(3);
@@ -66,11 +66,11 @@ public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstr
 
         checkDefaultTemplate(ignite, "org.apache.ignite.templat");
 
-        checkDefaultTemplate(ignite, null);
+        checkDefaultTemplate(ignite, DEFAULT_CACHE_NAME);
 
         checkGetOrCreate(ignite, "org.apache.ignite.template", 3);
 
-        CacheConfiguration templateCfg = new CacheConfiguration();
+        CacheConfiguration templateCfg = new CacheConfiguration("*");
 
         templateCfg.setBackups(4);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
index ff0a764..cad629d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
@@ -67,17 +67,17 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder).setForceServerMode(true);
 
         if (addTemplate) {
-            CacheConfiguration dfltCfg = new CacheConfiguration();
+            CacheConfiguration dfltCfg = new CacheConfiguration("*");
 
             dfltCfg.setAtomicityMode(TRANSACTIONAL);
             dfltCfg.setBackups(2);
 
-            CacheConfiguration templateCfg1 = new CacheConfiguration();
+            CacheConfiguration templateCfg1 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
             templateCfg1.setName(TEMPLATE1);
             templateCfg1.setBackups(3);
 
-            CacheConfiguration templateCfg2 = new CacheConfiguration();
+            CacheConfiguration templateCfg2 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
             templateCfg2.setName(TEMPLATE2);
             templateCfg2.setBackups(4);
@@ -133,7 +133,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
         assertNotNull(ignite2.cache("org.apache.ignite1"));
         assertNotNull(ignite2.cache("org.apache1"));
 
-        CacheConfiguration template1 = new CacheConfiguration();
+        CacheConfiguration template1 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         template1.setName(TEMPLATE3);
         template1.setBackups(5);
@@ -199,7 +199,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
         checkGetOrCreate(ignite2, "org.apache.ignite.cache2", 3);
         checkGetOrCreate(ignite2, "org.apache2", 2);
 
-        CacheConfiguration template1 = new CacheConfiguration();
+        CacheConfiguration template1 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         template1.setName(TEMPLATE3);
         template1.setBackups(5);
@@ -217,7 +217,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
         checkNoTemplateCaches(4);
 
         // Template with non-wildcard name.
-        CacheConfiguration template2 = new CacheConfiguration();
+        CacheConfiguration template2 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         template2.setName("org.apache.ignite");
         template2.setBackups(6);
@@ -228,19 +228,6 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
         checkGetOrCreate(ignite1, "org.apache.ignite", 6);
         checkGetOrCreate(ignite2, "org.apache.ignite", 6);
         checkGetOrCreate(ignite3, "org.apache.ignite", 6);
-
-        // Test name '*'.
-        CacheConfiguration template3 = new CacheConfiguration();
-
-        template3.setName("*");
-        template3.setBackups(7);
-
-        ignite1.addCacheConfiguration(template3);
-
-        checkGetOrCreate(ignite0, "x", 7);
-        checkGetOrCreate(ignite1, "x", 7);
-        checkGetOrCreate(ignite2, "x", 7);
-        checkGetOrCreate(ignite3, "x", 7);
     }
 
     /**
@@ -294,7 +281,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
 
                     log.info("Add configuration using node: " + ignite.name());
 
-                    CacheConfiguration cfg = new CacheConfiguration();
+                    CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
                     cfg.setName("org.apache.ignite" + iter + "*");
 
@@ -345,7 +332,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
         for (int i = 0; i < GRID_CNT; i++) {
             Ignite ignite = ignite(i);
 
-            CacheConfiguration ccfg = new CacheConfiguration();
+            CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
             ccfg.setName("cfg-" + i);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
index d070ac7..bba779f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
@@ -47,7 +47,7 @@ public abstract class IgniteCacheCopyOnReadDisabledAbstractTest extends GridCach
      * @throws Exception If failed.
      */
     public void testCopyOnReadDisabled() throws Exception {
-        IgniteCache<TestKey, TestValue> cache = ignite(0).cache(null);
+        IgniteCache<TestKey, TestValue> cache = ignite(0).cache(DEFAULT_CACHE_NAME);
 
         for (int i = 0; i < 100; i++) {
             TestKey key = new TestKey(i);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
index c92ea9e..5628c4d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
@@ -67,7 +67,7 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void checkStopStartCacheWithDataLoader(final boolean allowOverwrite) throws Exception {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(CacheMode.PARTITIONED);
 
@@ -79,7 +79,7 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
             /** {@inheritDoc} */
             @Override public Object call() throws Exception {
                 while (!stop.get()) {
-                    try (IgniteDataStreamer<Integer, Integer> str = ignite(0).dataStreamer(null)) {
+                    try (IgniteDataStreamer<Integer, Integer> str = ignite(0).dataStreamer(DEFAULT_CACHE_NAME)) {
                         str.allowOverwrite(allowOverwrite);
 
                         int i = 0;
@@ -119,7 +119,7 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
         try {
             Thread.sleep(500);
 
-            ignite(0).destroyCache(null);
+            ignite(0).destroyCache(DEFAULT_CACHE_NAME);
 
             Thread.sleep(500);
 
@@ -135,11 +135,11 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
 
         int cnt = 0;
 
-        for (Cache.Entry<Object, Object> ignored : ignite(0).cache(null))
+        for (Cache.Entry<Object, Object> ignored : ignite(0).cache(DEFAULT_CACHE_NAME))
             cnt++;
 
         info(">>> cnt=" + cnt);
 
-        ignite(0).destroyCache(null);
+        ignite(0).destroyCache(DEFAULT_CACHE_NAME);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index ef2f156..bcf46fd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -369,7 +369,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
             Map<Integer, Integer> vals = new HashMap<>();
 
-            for (Integer key : nearKeys(grid.cache(null), 100, 1_000_000))
+            for (Integer key : nearKeys(grid.cache(DEFAULT_CACHE_NAME), 100, 1_000_000))
                 vals.put(key, 1);
 
             final AtomicBoolean done = new AtomicBoolean();
@@ -633,7 +633,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
         try {
             awaitPartitionMapExchange();
 
-            IgniteCache<Object, Object> cache = grid.cache(null);
+            IgniteCache<Object, Object> cache = grid.cache(DEFAULT_CACHE_NAME);
 
             Integer key = Integer.MAX_VALUE;
 
@@ -657,7 +657,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
         try {
             awaitPartitionMapExchange();
 
-            IgniteCache<Object, Object> cache = grid.cache(null);
+            IgniteCache<Object, Object> cache = grid.cache(DEFAULT_CACHE_NAME);
 
             log.info("Check filter for listener in configuration.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
index c0e1a76..c767188 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
@@ -145,7 +145,7 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac
     private CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         CacheAtomicityMode atomicityMode) {
-        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setAtomicityMode(atomicityMode);
         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/IgniteCacheEntryProcessorCallTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java
index 9a84473..cd4a78f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java
@@ -108,7 +108,7 @@ public class IgniteCacheEntryProcessorCallTest extends GridCommonAbstractTest {
      */
     public void testEntryProcessorCall() throws Exception {
         {
-            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
             ccfg.setBackups(1);
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
             ccfg.setAtomicityMode(ATOMIC);
@@ -117,7 +117,7 @@ public class IgniteCacheEntryProcessorCallTest extends GridCommonAbstractTest {
         }
 
         {
-            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
             ccfg.setBackups(0);
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
             ccfg.setAtomicityMode(ATOMIC);
@@ -126,7 +126,7 @@ public class IgniteCacheEntryProcessorCallTest extends GridCommonAbstractTest {
         }
 
         {
-            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
             ccfg.setBackups(1);
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
             ccfg.setAtomicityMode(TRANSACTIONAL);
@@ -135,7 +135,7 @@ public class IgniteCacheEntryProcessorCallTest extends GridCommonAbstractTest {
         }
 
         {
-            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, TestValue> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
             ccfg.setBackups(0);
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
             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/IgniteCacheEntryProcessorNodeJoinTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
index e21353d..ec98294 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
@@ -91,7 +91,7 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
      * @return Cache configuration.
      */
     private CacheConfiguration cacheConfiguration() {
-        CacheConfiguration cache = new CacheConfiguration();
+        CacheConfiguration cache = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cache.setCacheMode(PARTITIONED);
         cache.setAtomicityMode(atomicityMode());
@@ -142,7 +142,7 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
         // TODO: IGNITE-1525 (test fails with one-phase commit).
         boolean createCache = atomicityMode() == TRANSACTIONAL;
 
-        String cacheName = null;
+        String cacheName = DEFAULT_CACHE_NAME;
 
         if (createCache) {
             CacheConfiguration ccfg = cacheConfiguration();
@@ -229,7 +229,7 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
             }, 1, "starter");
 
             try {
-                checkIncrement(null, invokeAll, null, null);
+                checkIncrement(DEFAULT_CACHE_NAME, invokeAll, null, null);
             }
             finally {
                 stop.set(true);
@@ -239,7 +239,7 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
 
             for (int i = 0; i < KEYS; i++) {
                 for (int g = 0; g < GRID_CNT + started; g++) {
-                    Set<String> vals = ignite(g).<String, Set<String>>cache(null).get("set-" + i);
+                    Set<String> vals = ignite(g).<String, Set<String>>cache(DEFAULT_CACHE_NAME).get("set-" + i);
 
                     assertNotNull(vals);
                     assertEquals(INCREMENTS, vals.size());
@@ -333,7 +333,7 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
             final AtomicBoolean done = new AtomicBoolean(false);
 
             for (int i = 0; i < keys; i++)
-                ignite(0).cache(null).put(i, 0);
+                ignite(0).cache(DEFAULT_CACHE_NAME).put(i, 0);
 
             IgniteInternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
                 @Override public void run() {
@@ -363,7 +363,7 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
 
                     for (int i = 0; i < keys; i++)
                         assertTrue("Failed [key=" + i + ", oldVal=" + updVal+ ']',
-                            ignite(0).cache(null).replace(i, updVal, updVal + 1));
+                            ignite(0).cache(DEFAULT_CACHE_NAME).replace(i, updVal, updVal + 1));
 
                     updVal++;
                 }
@@ -374,9 +374,9 @@ public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTes
 
             for (int i = 0; i < keys; i++) {
                 for (int g = 0; g < GRID_CNT + started; g++) {
-                    Integer val = ignite(g).<Integer, Integer>cache(null).get(i);
+                    Integer val = ignite(g).<Integer, Integer>cache(DEFAULT_CACHE_NAME).get(i);
 
-                    GridCacheEntryEx entry = ((IgniteKernal)grid(g)).internalCache(null).peekEx(i);
+                    GridCacheEntryEx entry = ((IgniteKernal)grid(g)).internalCache(DEFAULT_CACHE_NAME).peekEx(i);
 
                     if (updVal != val)
                         info("Invalid value for grid [g=" + g + ", entry=" + entry + ']');

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
index 18570a6..bd8d44e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
@@ -334,7 +334,7 @@ public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstrac
      * @return Cache configuration.
      */
     private CacheConfiguration<TestKey, TestValue> cacheConfiguration(CacheAtomicityMode atomicityMode, int backups) {
-        CacheConfiguration<TestKey, TestValue> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<TestKey, TestValue> 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/IgniteCacheGetCustomCollectionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java
index 3263024..9e6fd5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java
@@ -46,7 +46,7 @@ public class IgniteCacheGetCustomCollectionsSelfTest extends GridCommonAbstractT
 
         cfg.setMarshaller(null);
 
-        final CacheConfiguration<String, MyMap> mapCacheConfig = new CacheConfiguration<>();
+        final CacheConfiguration<String, MyMap> mapCacheConfig = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         mapCacheConfig.setCacheMode(CacheMode.PARTITIONED);
         mapCacheConfig.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java
index d7e05f7..f6341ec 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java
@@ -132,7 +132,7 @@ public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest {
 
                     Ignite ignite = startGrid(node);
 
-                    IgniteCache<Integer, Integer> cache = ignite.cache(null);
+                    IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
                     for (int i = 0; i < 1000; i++)
                         incrementTx(ignite, cache, incMap);
@@ -172,7 +172,7 @@ public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest {
                     checkCache(NODES + START_NODES - (i + 1), incMap);
 
                     for (int n = 0; n < SRVS; n++)
-                        ignite(n).cache(null).rebalance().get();
+                        ignite(n).cache(DEFAULT_CACHE_NAME).rebalance().get();
                 }
             }
             else {
@@ -201,7 +201,7 @@ public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest {
         assertEquals(expNodes, nodes.size());
 
         for (Ignite node : nodes) {
-            IgniteCache<Integer, Integer> cache = node.cache(null);
+            IgniteCache<Integer, Integer> cache = node.cache(DEFAULT_CACHE_NAME);
 
             for (Map.Entry<Integer, AtomicInteger> e : incMap.entrySet())
                 assertEquals((Integer)e.getValue().get(), cache.get(e.getKey()));
@@ -227,7 +227,7 @@ public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest {
 
                 Thread.currentThread().setName("update-" + ignite.name());
 
-                IgniteCache<Integer, Integer> cache = ignite.cache(null);
+                IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
                 while (!fut.isDone())
                     incrementTx(ignite, cache, incMap);
@@ -288,7 +288,7 @@ public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest {
      * @return Cache configuration.
      */
     private CacheConfiguration cacheConfiguration(int backups) {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setAtomicityMode(TRANSACTIONAL);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
index a476a3b..b8fc800 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
@@ -541,7 +541,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
                 Object val = cache.localPeek(key);
 
                 if (val == null)
-                    assertFalse(ignite(0).affinity(null).isPrimaryOrBackup(ignite(i).cluster().localNode(), key));
+                    assertFalse(ignite(0).affinity(DEFAULT_CACHE_NAME).isPrimaryOrBackup(ignite(i).cluster().localNode(), key));
                 else
                     assertEquals("Unexpected value for grid " + i, expVal, val);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
index c74039c..1caf157 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
@@ -329,7 +329,7 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo
         CacheAtomicityMode atomicityMode,
         int backups,
         boolean nearCache) {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setReadThrough(true);
         ccfg.setWriteThrough(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
index 3c50043..d545d09 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
@@ -73,7 +73,7 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract
         LruEvictionPolicy evictionPolicy = new LruEvictionPolicy<>();
         evictionPolicy.setMaxSize(LRU_MAX_SIZE);
 
-        CacheConfiguration<String, byte[]> cacheCfg = new CacheConfiguration<>();
+        CacheConfiguration<String, byte[]> cacheCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
         cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
         cacheCfg.setCacheMode(CacheMode.PARTITIONED);
         cacheCfg.setBackups(1);
@@ -105,7 +105,7 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract
 
             futs.add(GridTestUtils.runAsync(new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    ig.cache(null).localLoadCache(null);
+                    ig.cache(DEFAULT_CACHE_NAME).localLoadCache(null);
 
                     return null;
                 }
@@ -119,7 +119,7 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract
             for (int i = 0; i < gridCnt; i++) {
                 IgniteEx grid = grid(i);
 
-                final IgniteCache<Object, Object> cache = grid.cache(null);
+                final IgniteCache<Object, Object> cache = grid.cache(DEFAULT_CACHE_NAME);
 
                 GridTestUtils.waitForCondition(new PA() {
                     @Override public boolean apply() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
index 76667c5..ca9d15b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
@@ -74,7 +74,7 @@ public class IgniteCacheManyAsyncOperationsTest extends IgniteCacheAbstractTest
         try (Ignite client = startGrid(gridCount())) {
             assertTrue(client.configuration().isClientMode());
 
-            IgniteCache<Object, Object> cache = client.cache(null);
+            IgniteCache<Object, Object> cache = client.cache(DEFAULT_CACHE_NAME);
 
             final int ASYNC_OPS = cache.getConfiguration(CacheConfiguration.class).getMaxConcurrentAsyncOperations();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java
index 83c278f..11e81c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java
@@ -37,7 +37,7 @@ public class IgniteCacheObjectPutSelfTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        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/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
index 40b2cfd..28fc31c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java
@@ -60,9 +60,9 @@ public class IgniteCacheP2pUnmarshallingRebalanceErrorTest extends IgniteCacheP2
 
         startGrid(10); // Custom rebalanceDelay set at cfg.
 
-        Affinity<Object> aff = affinity(grid(10).cache(null));
+        Affinity<Object> aff = affinity(grid(10).cache(DEFAULT_CACHE_NAME));
 
-        GridCacheContext cctx = grid(10).context().cache().cache(null).context();
+        GridCacheContext cctx = grid(10).context().cache().cache(DEFAULT_CACHE_NAME).context();
 
         List<List<ClusterNode>> affAssign =
             cctx.affinity().assignment(cctx.affinity().affinityTopologyVersion()).idealAssignment();

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java
index a193a07..87549cf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java
@@ -69,14 +69,14 @@ public class IgniteCachePartitionMapUpdateTest extends GridCommonAbstractTest {
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
 
-        CacheConfiguration ccfg1 = new CacheConfiguration();
+        CacheConfiguration ccfg1 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg1.setName(CACHE1);
         ccfg1.setCacheMode(PARTITIONED);
         ccfg1.setBackups(1);
         ccfg1.setNodeFilter(new AttributeFilter(CACHE1_ATTR));
 
-        CacheConfiguration ccfg2 = new CacheConfiguration();
+        CacheConfiguration ccfg2 = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg2.setName(CACHE2);
         ccfg2.setCacheMode(PARTITIONED);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index 8681be2..81c0799 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -189,7 +189,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                 assertNull(cache0.localPeek(key, BACKUP));
             }
 
-            Affinity<Integer> aff = ignite(0).affinity(null);
+            Affinity<Integer> aff = ignite(0).affinity(DEFAULT_CACHE_NAME);
 
             for (int i = 0; i < gridCount(); i++) {
                 if (i == nodeIdx)
@@ -246,7 +246,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             Ignite ignite = ignite(nodeIdx);
 
             GridCacheAdapter<Integer, String> internalCache =
-                ((IgniteKernal)ignite).context().cache().internalCache();
+                ((IgniteKernal)ignite).context().cache().internalCache(DEFAULT_CACHE_NAME);
 
             CacheObjectContext coctx = internalCache.context().cacheObjectContext();
 
@@ -687,7 +687,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
             checkPrimarySize(PUT_KEYS);
 
-            Affinity<Integer> aff = ignite(0).affinity(null);
+            Affinity<Integer> aff = ignite(0).affinity(DEFAULT_CACHE_NAME);
 
             for (int i = 0; i < gridCount(); i++) {
                 if (i == nodeIdx)
@@ -761,7 +761,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                 int partSize = 0;
 
                 for (Integer key : keys){
-                    int keyPart = ignite(nodeIdx).affinity(null).partition(key);
+                    int keyPart = ignite(nodeIdx).affinity(DEFAULT_CACHE_NAME).partition(key);
                     if (keyPart == part)
                         partSize++;
                 }
@@ -791,7 +791,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                 int partSize = 0;
 
                 for (Integer key :keys){
-                    int keyPart = ignite(nodeIdx).affinity(null).partition(key);
+                    int keyPart = ignite(nodeIdx).affinity(DEFAULT_CACHE_NAME).partition(key);
                     if(keyPart == part)
                         partSize++;
                 }
@@ -831,7 +831,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
             checkPrimarySize(PUT_KEYS);
 
-            Affinity<Integer> aff = ignite(0).affinity(null);
+            Affinity<Integer> aff = ignite(0).affinity(DEFAULT_CACHE_NAME);
 
             for (int i = 0; i < gridCount(); i++) {
                 if (i == nodeIdx)
@@ -930,14 +930,14 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
         assertNotNull(it);
 
-        Affinity aff = ignite(nodeIdx).affinity(null);
+        Affinity aff = ignite(nodeIdx).affinity(DEFAULT_CACHE_NAME);
 
         ClusterNode node = ignite(nodeIdx).cluster().localNode();
 
         List<Integer> primary = new ArrayList<>();
         List<Integer> backups = new ArrayList<>();
 
-        CacheObjectContext coctx = ((IgniteEx)ignite(nodeIdx)).context().cache().internalCache()
+        CacheObjectContext coctx = ((IgniteEx)ignite(nodeIdx)).context().cache().internalCache(DEFAULT_CACHE_NAME)
             .context().cacheObjectContext();
 
         while (it.hasNext()) {
@@ -971,7 +971,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
      */
     private T2<List<Integer>, List<Integer>> offheapKeys(int nodeIdx) {
         GridCacheAdapter<Integer, String> internalCache =
-            ((IgniteKernal)ignite(nodeIdx)).context().cache().internalCache();
+            ((IgniteKernal)ignite(nodeIdx)).context().cache().internalCache(DEFAULT_CACHE_NAME);
 
 // TODO GG-11148.
         Iterator<Map.Entry<Integer, String>> offheapIt = Collections.EMPTY_MAP.entrySet().iterator();
@@ -980,7 +980,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 //        else
 //            offheapIt = internalCache.context().swap().lazyOffHeapIterator(false);
 
-        Affinity aff = ignite(nodeIdx).affinity(null);
+        Affinity aff = ignite(nodeIdx).affinity(DEFAULT_CACHE_NAME);
 
         ClusterNode node = ignite(nodeIdx).cluster().localNode();
 
@@ -1018,7 +1018,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
      * @return Tuple with number of primary and backup keys (one or both will be zero).
      */
     private T2<Integer, Integer> offheapKeysCount(int nodeIdx, int part) throws IgniteCheckedException {
-        GridCacheContext ctx = ((IgniteEx)ignite(nodeIdx)).context().cache().internalCache().context();
+        GridCacheContext ctx = ((IgniteEx)ignite(nodeIdx)).context().cache().internalCache(DEFAULT_CACHE_NAME).context();
         // Swap and offheap are disabled for near cache.
         IgniteCacheOffheapManager offheapManager = ctx.isNear() ? ctx.near().dht().context().offheap() : ctx.offheap();
         //First count entries...

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
index 8550e2c..381a044 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
@@ -214,7 +214,7 @@ public class IgniteCacheReadThroughStoreCallTest extends GridCommonAbstractTest
     protected CacheConfiguration<Object, Object> cacheConfiguration(CacheMode cacheMode,
         CacheAtomicityMode atomicityMode,
         int backups) {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setReadThrough(true);
         ccfg.setWriteThrough(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
index 0aaff8d..37f0879 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
@@ -93,7 +93,7 @@ public class IgniteCacheScanPredicateDeploymentSelfTest extends GridCommonAbstra
         awaitPartitionMapExchange();
 
         try {
-            IgniteCache<Object, Object> cache = grid(3).cache(null);
+            IgniteCache<Object, Object> cache = grid(3).cache(DEFAULT_CACHE_NAME);
 
             // It is important that there are no too many keys.
             for (int i = 0; i < 1; i++)

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java
index 2eba073..06d82e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java
@@ -77,7 +77,7 @@ public class IgniteCacheSerializationSelfTest extends GridCommonAbstractTest {
      * @return Cache configuration.
      */
     private CacheConfiguration<Integer, Integer> cacheConfiguration(CacheMode cacheMode, CacheAtomicityMode atomicityMode) {
-        CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(cacheMode);
         ccfg.setAtomicityMode(atomicityMode);
@@ -106,7 +106,7 @@ public class IgniteCacheSerializationSelfTest extends GridCommonAbstractTest {
             });
         }
         finally {
-            client.destroyCache(null);
+            client.destroyCache(DEFAULT_CACHE_NAME);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java
index f80ebc6..7cb9861 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java
@@ -91,7 +91,7 @@ public class IgniteCacheStartStopLoadTest extends GridCommonAbstractTest {
 
             GridTestUtils.runMultiThreaded(new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    CacheConfiguration ccfg = new CacheConfiguration();
+                    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
                     ccfg.setName(CACHE_NAMES[idx.getAndIncrement()]);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
index f2c55e2..0aa007c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
@@ -47,12 +47,12 @@ public class IgniteCacheStoreCollectionTest 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.setWriteSynchronizationMode(FULL_SYNC);
 
-        CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>();
+        CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
         ccfg2.setName("cache2");
         ccfg2.setAtomicityMode(TRANSACTIONAL);
         ccfg2.setWriteSynchronizationMode(FULL_SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
index 224d1fe..eceb9d2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
@@ -125,9 +125,9 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
 
         startGrids();
 
-        IgniteCache<TestKey, TestValue> cache = grid(0).cache(null);
+        IgniteCache<TestKey, TestValue> cache = grid(0).cache(DEFAULT_CACHE_NAME);
 
-        Affinity<Object> aff = grid(0).affinity(null);
+        Affinity<Object> aff = grid(0).affinity(DEFAULT_CACHE_NAME);
 
         final List<WeakReference<Object>> refs = new ArrayList<>();
 
@@ -142,7 +142,7 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
             checkNoValue(aff, key);
 
             for (int g = 0; g < gridCount(); g++)
-                assertNotNull(grid(g).cache(null).get(key));
+                assertNotNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
             checkNoValue(aff, key);
 
@@ -159,16 +159,16 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
             checkNoValue(aff, key);
 
             for (int g = 0; g < gridCount(); g++)
-                assertNotNull(grid(g).cache(null).get(key));
+                assertNotNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
             checkNoValue(aff, key);
 
             cache.remove(key);
 
             for (int g = 0; g < gridCount(); g++)
-                assertNull(grid(g).cache(null).get(key));
+                assertNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
-            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(null)) {
+            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(DEFAULT_CACHE_NAME)) {
                 streamer.addData(key, val);
             }
 
@@ -176,7 +176,7 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
 
             cache.remove(key);
 
-            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(null)) {
+            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(DEFAULT_CACHE_NAME)) {
                 streamer.allowOverwrite(true);
 
                 streamer.addData(key, val);
@@ -202,7 +202,7 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
         checkNoValue(aff, key);
 
         for (int g = 0; g < gridCount(); g++)
-            assertNotNull(grid(g).cache(null).get(key));
+            assertNotNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
         checkNoValue(aff, key);
 
@@ -294,9 +294,9 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
 
         startGrids();
 
-        IgniteCache<TestKey, TestValue> cache = grid(0).cache(null);
+        IgniteCache<TestKey, TestValue> cache = grid(0).cache(DEFAULT_CACHE_NAME);
 
-        Affinity<Object> aff = grid(0).affinity(null);
+        Affinity<Object> aff = grid(0).affinity(DEFAULT_CACHE_NAME);
 
         for (int i = 0; i < 100; i++) {
             TestKey key = new TestKey(i);
@@ -307,7 +307,7 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
             checkHasValue(aff, key);
 
             for (int g = 0; g < gridCount(); g++)
-                assertNotNull(grid(g).cache(null).get(key));
+                assertNotNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
             checkHasValue(aff, key);
 
@@ -324,16 +324,16 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
             checkHasValue(aff, key);
 
             for (int g = 0; g < gridCount(); g++)
-                assertNotNull(grid(g).cache(null).get(key));
+                assertNotNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
             checkHasValue(aff, key);
 
             cache.remove(key);
 
             for (int g = 0; g < gridCount(); g++)
-                assertNull(grid(g).cache(null).get(key));
+                assertNull(grid(g).cache(DEFAULT_CACHE_NAME).get(key));
 
-            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(null)) {
+            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(DEFAULT_CACHE_NAME)) {
                 streamer.addData(key, val);
             }
 
@@ -341,7 +341,7 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
 
             cache.remove(key);
 
-            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(null)) {
+            try (IgniteDataStreamer<TestKey, TestValue> streamer  = grid(0).dataStreamer(DEFAULT_CACHE_NAME)) {
                 streamer.allowOverwrite(true);
 
                 streamer.addData(key, val);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
index c1f08ac..ebd0a96 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
@@ -57,7 +57,7 @@ public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest {
 
         cfg.setDiscoverySpi(disco);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setCacheMode(REPLICATED);
         ccfg.setAtomicityMode(TRANSACTIONAL);
@@ -98,18 +98,18 @@ public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest {
     private void txNoWrite(boolean commit) throws Exception {
         Ignite ignite0 = startGrid(0);
 
-        Affinity<Integer> aff = ignite0.affinity(null);
+        Affinity<Integer> aff = ignite0.affinity(DEFAULT_CACHE_NAME);
 
-        IgniteCache<Integer, Object> cache0 = ignite0.cache(null);
+        IgniteCache<Integer, Object> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
 
-        try (IgniteDataStreamer<Integer, Object> streamer = ignite0.dataStreamer(null)) {
+        try (IgniteDataStreamer<Integer, Object> streamer = ignite0.dataStreamer(DEFAULT_CACHE_NAME)) {
             for (int i = 0; i < 1000; i++)
                 streamer.addData(i + 10000, new byte[1024]);
         }
 
         Ignite ignite1 = startGrid(1);
 
-        Integer key = primaryKey(ignite1.cache(null));
+        Integer key = primaryKey(ignite1.cache(DEFAULT_CACHE_NAME));
 
         // Want test scenario when ignite1 is new primary node, but ignite0 is still partition owner.
         assertTrue(aff.isPrimary(ignite1.cluster().localNode(), key));
@@ -121,7 +121,7 @@ public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest {
                 tx.commit();
         }
 
-        GridCacheAdapter cacheAdapter = ((IgniteKernal)ignite(0)).context().cache().internalCache();
+        GridCacheAdapter cacheAdapter = ((IgniteKernal)ignite(0)).context().cache().internalCache(DEFAULT_CACHE_NAME);
 
         // Check all transactions are finished.
         assertEquals(0, cacheAdapter.context().tm().idMapSize());

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
index 09d1099..0a7a680 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
@@ -54,7 +54,7 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
 
         if (cache) {
-            CacheConfiguration ccfg = new CacheConfiguration();
+            CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
             ccfg.setCacheMode(CacheMode.PARTITIONED);
             ccfg.setBackups(1);
@@ -98,15 +98,15 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
 
             GridTestUtils.assertThrows(log, new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    ((IgniteKernal)ignite3).getCache(null);
+                    ((IgniteKernal)ignite3).getCache(DEFAULT_CACHE_NAME);
 
                     return null;
                 }
             }, IllegalArgumentException.class, null);
 
-            assertNotNull(ignite3.cache(null)); // Start client cache.
+            assertNotNull(ignite3.cache(DEFAULT_CACHE_NAME)); // Start client cache.
 
-            ((IgniteKernal)ignite3).getCache(null);
+            ((IgniteKernal)ignite3).getCache(DEFAULT_CACHE_NAME);
 
             checkAffinity(topVer++);
 
@@ -114,15 +114,15 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
 
             GridTestUtils.assertThrows(log, new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    ((IgniteKernal)ignite4).getCache(null);
+                    ((IgniteKernal)ignite4).getCache(DEFAULT_CACHE_NAME);
 
                     return null;
                 }
             }, IllegalArgumentException.class, null);
 
-            assertNotNull(ignite4.cache(null)); // Start client cache.
+            assertNotNull(ignite4.cache(DEFAULT_CACHE_NAME)); // Start client cache.
 
-            ((IgniteKernal)ignite4).getCache(null);
+            ((IgniteKernal)ignite4).getCache(DEFAULT_CACHE_NAME);
 
             checkAffinity(topVer++);
 
@@ -130,7 +130,7 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
 
             GridTestUtils.assertThrows(log, new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    ((IgniteKernal)ignite5).getCache(null);
+                    ((IgniteKernal)ignite5).getCache(DEFAULT_CACHE_NAME);
 
                     return null;
                 }
@@ -162,14 +162,14 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
     private void checkAffinity(long topVer) throws Exception {
         awaitTopology(topVer);
 
-        Affinity<Object> aff = grid(0).affinity(null);
+        Affinity<Object> aff = grid(0).affinity(DEFAULT_CACHE_NAME);
 
         for (Ignite grid : Ignition.allGrids()) {
             try {
                 if (grid.cluster().localNode().id().equals(grid(0).localNode().id()))
                     continue;
 
-                Affinity<Object> checkAff = grid.affinity(null);
+                Affinity<Object> checkAff = grid.affinity(DEFAULT_CACHE_NAME);
 
                 for (int p = 0; p < PARTS; p++)
                     assertEquals(aff.mapPartitionToPrimaryAndBackups(p), checkAff.mapPartitionToPrimaryAndBackups(p));
@@ -186,7 +186,7 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
      */
     private void awaitTopology(final long topVer) throws Exception {
         for (Ignite grid : Ignition.allGrids()) {
-            final GridCacheAdapter cache = ((IgniteKernal)grid).internalCache(null);
+            final GridCacheAdapter cache = ((IgniteKernal)grid).internalCache(DEFAULT_CACHE_NAME);
 
             if (cache == null)
                 continue;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
index 96c65e3..fdf5350 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
@@ -121,7 +121,7 @@ public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest
 
         Ignite ignite2 = startGrid(nodeIdx);
 
-        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
 
         ccfg.setRebalanceMode(SYNC);
         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/IgniteDynamicCacheAndNodeStop.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java
index 1033fe1..50f45a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java
@@ -62,7 +62,7 @@ public class IgniteDynamicCacheAndNodeStop extends GridCommonAbstractTest {
 
             startGrid(1);
 
-            final  CacheConfiguration ccfg = new CacheConfiguration();
+            final  CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
             ignite.createCache(ccfg);
 
@@ -72,7 +72,7 @@ public class IgniteDynamicCacheAndNodeStop extends GridCommonAbstractTest {
                 @Override public Object call() throws Exception {
                     barrier.await();
 
-                    ignite.destroyCache(null);
+                    ignite.destroyCache(DEFAULT_CACHE_NAME);
 
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
index aa6166f..53c1cb2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
@@ -53,7 +53,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest {
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
 
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setCacheMode(REPLICATED);
@@ -89,7 +89,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest {
 
         Ignite ignite0 = startGrid(0);
 
-        IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
+        IgniteCache<Integer, Integer> cache0 = ignite0.cache(DEFAULT_CACHE_NAME);
 
         assertNotNull(cache0);
 
@@ -99,7 +99,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest {
 
         Ignite ignite1 = startGrid(1);
 
-        IgniteCache<Integer, Integer> cache1 = ignite1.cache(null);
+        IgniteCache<Integer, Integer> cache1 = ignite1.cache(DEFAULT_CACHE_NAME);
 
         assertNotNull(cache1);
 
@@ -107,7 +107,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest {
 
         Ignite ignite2 = startGrid(2);
 
-        IgniteCache<Integer, Integer> cache2 = ignite2.cache(null);
+        IgniteCache<Integer, Integer> cache2 = ignite2.cache(DEFAULT_CACHE_NAME);
 
         assertNotNull(cache2);
 
@@ -115,7 +115,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest {
 
         Ignite ignite3 = startGrid(3);
 
-        IgniteCache<Integer, Integer> cache3 = ignite3.cache(null);
+        IgniteCache<Integer, Integer> cache3 = ignite3.cache(DEFAULT_CACHE_NAME);
 
         assertNotNull(cache3);
 


Mime
View raw message