ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [13/35] incubator-ignite git commit: IGNITE-96 Migrating tests on new API.
Date Tue, 10 Feb 2015 16:15:57 GMT
IGNITE-96 Migrating tests on new API.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ae5198fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ae5198fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ae5198fc

Branch: refs/heads/ignite-96
Commit: ae5198fc42d97472a33daf2b822ccab814a1e0b2
Parents: 2c2204d
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Mon Feb 9 19:46:56 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Mon Feb 9 19:47:11 2015 +0300

----------------------------------------------------------------------
 .../GridCacheBatchEvictUnswapSelfTest.java      |   10 +-
 ...heConcurrentEvictionConsistencySelfTest.java |   10 +-
 .../GridCacheConcurrentEvictionsSelfTest.java   |    6 +-
 .../GridCacheDistributedEvictionsSelfTest.java  |   16 +-
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |   50 +-
 .../eviction/GridCacheEvictionAbstractTest.java |   16 +-
 .../GridCacheEvictionFilterSelfTest.java        |   14 +-
 .../GridCacheEvictionTouchSelfTest.java         |   37 +-
 .../lru/GridCacheLruEvictionPolicySelfTest.java |    6 +-
 .../GridCacheLruNearEvictionPolicySelfTest.java |    2 +-
 ...heNearOnlyLruNearEvictionPolicySelfTest.java |    2 +-
 .../GridCacheRandomEvictionPolicySelfTest.java  |   16 +-
 .../GridCacheLocalByteArrayValuesSelfTest.java  |   23 +-
 .../local/GridCacheLocalLoadAllSelfTest.java    |    2 +-
 .../local/GridCacheLocalTxTimeoutSelfTest.java  |   13 +-
 .../dataload/GridDataLoaderImplSelfTest.java    |    2 +-
 .../GridDataLoaderProcessorSelfTest.java        |   16 +-
 .../processors/fs/GridGgfsCacheSelfTest.java    |    6 +-
 .../GridServiceProcessorAbstractSelfTest.java   |   10 +-
 .../GridServiceProcessorMultiNodeSelfTest.java  |    2 +-
 .../apache/ignite/lang/GridFuncSelfTest.java    | 3234 ------------------
 .../loadtests/GridCacheMultiNodeLoadTest.java   |    2 -
 .../loadtests/cache/GridCacheLoadTest.java      |    4 +-
 .../GridCachePartitionedAtomicLongLoadTest.java |    4 +-
 24 files changed, 136 insertions(+), 3367 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
index 216d8a7..4be0310 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
@@ -119,7 +119,7 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
 
         final AtomicInteger evictedKeysCnt = new AtomicInteger();
 
-        final GridCache<Object, Object> cache = g.cache(null);
+        final IgniteCache<Object, Object> cache = g.jcache(null);
 
         cache.loadCache(null, 0);
 
@@ -135,7 +135,8 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
                     keys.add(i);
 
                     if (keys.size() == batchSize) {
-                        cache.evictAll(keys);
+                        for (Long key : keys)
+                            cache.evict(key);
 
                         evictedKeysCnt.addAndGet(batchSize);
 
@@ -163,7 +164,8 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
                         keys.add(i);
 
                         if (keys.size() == batchSize) {
-                            cache.promoteAll(keys);
+                            for (Long key : keys)
+                                cache.promote(key);
 
                             unswappedKeys.addAndGet(batchSize);
 
@@ -176,7 +178,7 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
                         }
                     }
                 }
-                catch (IgniteCheckedException e) {
+                catch (IgniteException e) {
                     e.printStackTrace();
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
index 223971f..0b89103 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
@@ -171,9 +171,9 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
      */
     private void checkPolicyConsistency() throws Exception {
         try {
-            Ignite ignite = startGrid(1);
+            final Ignite ignite = startGrid(1);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             long start = System.currentTimeMillis();
 
@@ -187,10 +187,10 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
 
                             int j = rnd.nextInt(keyCnt);
 
-                            try (IgniteTx tx = cache.txStart()) {
+                            try (IgniteTx tx = ignite.transactions().txStart()) {
                                 // Put or remove?
                                 if (rnd.nextBoolean())
-                                    cache.putx(j, j);
+                                    cache.put(j, j);
                                 else
                                     cache.remove(j);
 
@@ -215,7 +215,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
                 ", internalQueueSize" + queue.size() + ", duration=" + (System.currentTimeMillis() - start) + ']');
 
             for (Cache.Entry<Integer, Integer> e : queue) {
-                Integer rmv = cache.remove(e.getKey());
+                Integer rmv = cache.getAndRemove(e.getKey());
 
                 if (rmv == null)
                     fail("Eviction policy contains key that is not present in cache: " + e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
index b8986ba..9e31411 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
@@ -132,11 +132,11 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest
         try {
             Ignite ignite = startGrid(1);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             // Warm up.
             for (int i = 0; i < warmUpPutsCnt; i++) {
-                cache.putx(i, i);
+                cache.put(i, i);
 
                 if (i != 0 && i % 1000 == 0)
                     info("Warm up puts count: " + i);
@@ -158,7 +158,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest
                         for (int i = 0; i < iterCnt; i++) {
                             int j = idx.incrementAndGet();
 
-                            cache.putx(j, j);
+                            cache.put(j, j);
 
                             if (i != 0 && i % 10000 == 0)
                                 // info("Puts count: " + i);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
index ec2d50d..e3c9698 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
@@ -165,10 +165,10 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes
 
         Ignite g = startGrid(0);
 
-        final GridCache<Integer, Integer> cache = g.cache(null);
+        final IgniteCache<Integer, Integer> cache = g.jcache(null);
 
         for (int i = 1; i < 20; i++) {
-            cache.putx(i * gridCnt, i * gridCnt);
+            cache.put(i * gridCnt, i * gridCnt);
 
             info("Put to cache: " + i * gridCnt);
         }
@@ -181,10 +181,10 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes
 
             Ignite ignite = grid(0);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             // Put 1 entry to primary node.
-            cache.putx(0, 0);
+            cache.put(0, 0);
 
             Integer nearVal = this.<Integer, Integer>jcache(2).get(0);
 
@@ -192,7 +192,7 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes
 
             // Put several vals to primary node.
             for (int i = 1; i < 20; i++) {
-                cache.putx(i * gridCnt, i * gridCnt);
+                cache.put(i * gridCnt, i * gridCnt);
 
                 info("Put to cache: " + i * gridCnt);
             }
@@ -228,10 +228,8 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes
                 info("Near node near key set: " + new TreeSet<>(this.<Integer, Integer>near(2).keySet()));
 
                 try {
-                    assert cache.size() == 10 : "Invalid cache size [size=" + cache.size() +
-                        ", keys=" + new TreeSet<>(cache.keySet()) + ']';
-                    assert cache.size() == 10 : "Invalid key size [size=" + cache.size() +
-                        ", keys=" + new TreeSet<>(cache.keySet()) + ']';
+                    assert cache.size() == 10 : "Invalid cache size [size=" + cache.size() + ']';
+                    assert cache.size() == 10 : "Invalid key size [size=" + cache.size() + ']';
 
                     assert jcache(2).localSize() == 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
index 8337607..05c2512 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
@@ -34,6 +34,8 @@ import org.apache.ignite.transactions.*;
 
 import javax.cache.configuration.*;
 
+import java.util.*;
+
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 
 /**
@@ -170,13 +172,13 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
 
                 Ignite g = startGrids();
 
-                GridCache<String, String> cache = g.cache(null);
+                IgniteCache<String, String> cache = g.jcache(null);
 
                 try {
                     info(">>> Checking policy [txConcurrency=" + txConcurrency + ", txIsolation=" + txIsolation +
                         ", plc=" + plc + ", nearPlc=" + nearPlc + ']');
 
-                    checkExplicitTx(cache);
+                    checkExplicitTx(g, cache);
 
                     checkImplicitTx(cache);
                 }
@@ -193,12 +195,20 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
      * @param cache Cache to test.
      * @throws Exception If failed.
      */
-    private void checkImplicitTx(GridCache<String, String> cache) throws Exception {
+    private void checkImplicitTx(IgniteCache<String, String> cache) throws Exception {
         assertNull(cache.get("key1"));
-        assertNull(cache.getAsync("key2").get());
 
-        assertTrue(cache.getAll(F.asList("key3", "key4")).isEmpty());
-        assertTrue(cache.getAllAsync(F.asList("key5", "key6")).get().isEmpty());
+        IgniteCache<String, String> asyncCache = cache.withAsync();
+
+        asyncCache.get("key2");
+
+        assertNull(asyncCache.future().get());
+
+        assertTrue(cache.getAll(F.asSet("key3", "key4")).isEmpty());
+
+        asyncCache.getAll(F.asSet("key5", "key6"));
+
+        assertTrue(((Collection)asyncCache.future().get()).isEmpty());
 
         cache.put("key7", "key7");
         cache.remove("key7", "key7");
@@ -213,8 +223,10 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
      * @param cache Cache to test.
      * @throws Exception If failed.
      */
-    private void checkExplicitTx(GridCache<String, String> cache) throws Exception {
-        IgniteTx tx = cache.txStart();
+    private void checkExplicitTx(Ignite ignite, IgniteCache<String, String> cache) throws Exception {
+        IgniteCache<String, String> asyncCache = cache.withAsync();
+
+        IgniteTx tx = ignite.transactions().txStart();
 
         try {
             assertNull(cache.get("key1"));
@@ -225,10 +237,12 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
             tx.close();
         }
 
-        tx = cache.txStart();
+        tx = ignite.transactions().txStart();
 
         try {
-            assertNull(cache.getAsync("key2").get());
+            asyncCache.get("key2");
+
+            assertNull(asyncCache.future().get());
 
             tx.commit();
         }
@@ -236,10 +250,10 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
             tx.close();
         }
 
-        tx = cache.txStart();
+        tx = ignite.transactions().txStart();
 
         try {
-            assertTrue(cache.getAll(F.asList("key3", "key4")).isEmpty());
+            assertTrue(cache.getAll(F.asSet("key3", "key4")).isEmpty());
 
             tx.commit();
         }
@@ -247,10 +261,12 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
             tx.close();
         }
 
-        tx = cache.txStart();
+        tx = ignite.transactions().txStart();
 
         try {
-            assertTrue(cache.getAllAsync(F.asList("key5", "key6")).get().isEmpty());
+            asyncCache.getAll(F.asSet("key5", "key6"));
+
+            assertTrue(((Collection)asyncCache.future().get()).isEmpty());
 
             tx.commit();
         }
@@ -258,7 +274,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
             tx.close();
         }
 
-        tx = cache.txStart();
+        tx = ignite.transactions().txStart();
 
         try {
             cache.put("key7", "key7");
@@ -283,10 +299,10 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
      * @throws org.apache.ignite.internal.IgniteInterruptedCheckedException If interrupted while sleeping.
      */
     @SuppressWarnings({"ErrorNotRethrown", "TypeMayBeWeakened"})
-    private void checkEmpty(GridCache<String, String> cache) throws IgniteInterruptedCheckedException {
+    private void checkEmpty(IgniteCache<String, String> cache) throws IgniteInterruptedCheckedException {
         for (int i = 0; i < 3; i++) {
             try {
-                assertTrue(cache.entrySet().toString(), cache.entrySet().isEmpty());
+                assertTrue(!cache.iterator().hasNext());
 
                 break;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionAbstractTest.java
index 5dd5496..9de57d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionAbstractTest.java
@@ -17,9 +17,11 @@
 
 package org.apache.ignite.internal.processors.cache.eviction;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -159,7 +161,7 @@ public abstract class GridCacheEvictionAbstractTest<T extends CacheEvictionPolic
     /** @return Policy. */
     @SuppressWarnings({"unchecked"})
     protected T policy() {
-        return (T)grid().cache(null).configuration().getEvictionPolicy();
+        return (T)internalCache().configuration().getEvictionPolicy();
     }
 
     /**
@@ -168,7 +170,7 @@ public abstract class GridCacheEvictionAbstractTest<T extends CacheEvictionPolic
      */
     @SuppressWarnings({"unchecked"})
     protected T policy(int i) {
-        return (T)grid(i).cache(null).configuration().getEvictionPolicy();
+        return (T)internalCache(i).configuration().getEvictionPolicy();
     }
 
     /**
@@ -177,7 +179,7 @@ public abstract class GridCacheEvictionAbstractTest<T extends CacheEvictionPolic
      */
     @SuppressWarnings({"unchecked"})
     protected T nearPolicy(int i) {
-        return (T)grid(i).cache(null).configuration().getNearEvictionPolicy();
+        return (T)internalCache(i).configuration().getNearEvictionPolicy();
     }
 
     /**
@@ -296,7 +298,7 @@ public abstract class GridCacheEvictionAbstractTest<T extends CacheEvictionPolic
             int cnt = 500;
 
             for (int i = 0; i < cnt; i++) {
-                GridCache<Integer, String> cache = grid(rand.nextInt(2)).cache(null);
+                IgniteCache<Integer, String> cache = grid(rand.nextInt(2)).jcache(null);
 
                 int key = rand.nextInt(100);
                 String val = Integer.toString(key);
@@ -347,12 +349,14 @@ public abstract class GridCacheEvictionAbstractTest<T extends CacheEvictionPolic
                     int cnt = 100;
 
                     for (int i = 0; i < cnt && !Thread.currentThread().isInterrupted(); i++) {
-                        GridCache<Integer, String> cache = grid(rand.nextInt(2)).cache(null);
+                        IgniteEx grid = grid(rand.nextInt(2));
+
+                        IgniteCache<Integer, String> cache = grid.jcache(null);
 
                         int key = rand.nextInt(1000);
                         String val = Integer.toString(key);
 
-                        try (IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                        try (IgniteTx tx = grid.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                             String v = cache.get(key);
 
                             assert v == null || v.equals(Integer.toString(key)) : "Invalid value for key [key=" + key +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
index d2b08fd..1f560f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
@@ -132,12 +132,12 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
         try {
             Ignite g = grid(0);
 
-            GridCache<Object, Object> c = g.cache(null);
+            IgniteCache<Object, Object> c = g.jcache(null);
 
             int cnt = 1;
 
             for (int i = 0; i < cnt; i++)
-                c.putx(i, i);
+                c.put(i, i);
 
             Map<Object, AtomicInteger> cnts = filter.counts();
 
@@ -187,18 +187,18 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
 
         Ignite g = startGrid();
 
-        GridCache<Object, Object> cache = g.cache(null);
+        IgniteCache<Object, Object> cache = g.jcache(null);
 
         try {
             int id = 1;
 
-            cache.putx(id++, 1);
-            cache.putx(id++, 2);
+            cache.put(id++, 1);
+            cache.put(id++, 2);
 
             for (int i = id + 1; i < 10; i++) {
-                cache.putx(id, id);
+                cache.put(id, id);
 
-                cache.putx(i, String.valueOf(i));
+                cache.put(i, String.valueOf(i));
             }
 
             info(">>>> " + cache.get(1));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
index 6e0b7a6..9b2270a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.eviction;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.eviction.*;
 import org.apache.ignite.cache.eviction.fifo.*;
@@ -118,11 +117,11 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         try {
             Ignite ignite = startGrid(1);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             final Random rnd = new Random();
 
-            try (IgniteTx tx = cache.txStart()) {
+            try (IgniteTx tx = ignite.transactions().txStart()) {
                 int iterCnt = 20;
                 int keyCnt = 5000;
 
@@ -131,7 +130,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
                     // Put or remove?
                     if (rnd.nextBoolean())
-                        cache.putx(j, j);
+                        cache.put(j, j);
                     else
                         cache.remove(j);
 
@@ -170,7 +169,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         try {
             Ignite ignite = startGrid(1);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             for (int i = 0; i < 100; i++)
                 cache.put(i, i);
@@ -197,7 +196,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         try {
             Ignite ignite = startGrid(1);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             Collection<Integer> keys = new ArrayList<>(100);
 
@@ -209,7 +208,8 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
             assertEquals(100, ((CacheFifoEvictionPolicy)plc).queue().size());
 
-            cache.evictAll(keys);
+            for (Integer key : keys)
+                cache.evict(key);
 
             assertEquals(0, ((CacheFifoEvictionPolicy)plc).queue().size());
             assertEquals(0, cache.size());
@@ -230,9 +230,9 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
             Integer affKey = 1;
 
-            GridCache<CacheAffinityKey<Object>, Integer> cache = g.cache(null);
+            IgniteCache<CacheAffinityKey<Object>, Integer> cache = g.jcache(null);
 
-            IgniteTx tx = cache.txStartAffinity(affKey, PESSIMISTIC, REPEATABLE_READ, 0, 5);
+            IgniteTx tx = g.transactions().txStartAffinity(cache.getName(), affKey, PESSIMISTIC, REPEATABLE_READ, 0, 5);
 
             try {
                 for (int i = 0; i < 5; i++)
@@ -246,7 +246,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
             assertEquals(5, ((CacheFifoEvictionPolicy)plc).queue().size());
 
-            tx = cache.txStartAffinity(affKey, PESSIMISTIC, REPEATABLE_READ, 0, 5);
+            tx = g.transactions().txStartAffinity(cache.getName(), affKey, PESSIMISTIC, REPEATABLE_READ, 0, 5);
 
             try {
                 for (int i = 0; i < 5; i++)
@@ -276,10 +276,10 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
             Integer affKey = 1;
 
-            GridCache<Object, Integer> cache = g.cache(null);
+            IgniteCache<Object, Integer> cache = g.jcache(null);
 
-            IgniteTx tx = cache.txStartPartition(cache.affinity().partition(affKey), PESSIMISTIC, REPEATABLE_READ,
-                0, 5);
+            IgniteTx tx = g.transactions().txStartPartition(cache.getName(),
+                    g.affinity(cache.getName()).partition(affKey), PESSIMISTIC, REPEATABLE_READ, 0, 5);
 
             try {
                 for (int i = 0; i < 5; i++)
@@ -293,7 +293,8 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
             assertEquals(5, ((CacheFifoEvictionPolicy)plc).queue().size());
 
-            tx = cache.txStartPartition(cache.affinity().partition(affKey), PESSIMISTIC, REPEATABLE_READ, 0, 5);
+            tx = g.transactions().txStartPartition(cache.getName(), g.affinity(cache.getName()).partition(affKey),
+                    PESSIMISTIC, REPEATABLE_READ, 0, 5);
 
             try {
                 for (int i = 0; i < 5; i++)
@@ -321,21 +322,21 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         try {
             Ignite ignite = startGrid(1);
 
-            final GridCache<Integer, Integer> cache = ignite.cache(null);
+            final IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             for (int i = 0; i < 10000; i++)
-                cache.reload(i);
+                load(cache, i, true);
 
             assertEquals(100, cache.size());
             assertEquals(100, cache.size());
             assertEquals(100, ((CacheFifoEvictionPolicy)plc).queue().size());
 
-            Collection<Integer> keys = new ArrayList<>(10000);
+            Set<Integer> keys = new TreeSet<>();
 
             for (int i = 0; i < 10000; i++)
                 keys.add(i);
 
-            cache.reloadAll(keys);
+            loadAll(cache, keys, true);
 
             assertEquals(100, cache.size());
             assertEquals(100, cache.size());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruEvictionPolicySelfTest.java
index add9069..93a7e40 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruEvictionPolicySelfTest.java
@@ -356,7 +356,7 @@ public class GridCacheLruEvictionPolicySelfTest extends
         Ignite ignite = startGrid();
 
         try {
-            GridCache<Integer, Integer> cache = ignite.cache(null);
+            IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             int cnt = 500;
 
@@ -379,8 +379,6 @@ public class GridCacheLruEvictionPolicySelfTest extends
 
             info("Min cache size [min=" + min + ", idx=" + minIdx + ']');
             info("Current cache size " + cache.size());
-            info("Current cache key size " + cache.size());
-            info("Current cache entry set size " + cache.entrySet().size());
 
             min = Integer.MAX_VALUE;
 
@@ -401,8 +399,6 @@ public class GridCacheLruEvictionPolicySelfTest extends
             info("----");
             info("Min cache size [min=" + min + ", idx=" + minIdx + ']');
             info("Current cache size " + cache.size());
-            info("Current cache key size " + cache.size());
-            info("Current cache entry set size " + cache.entrySet().size());
 
             assert min >= plcMax : "Min cache size is too small: " + min;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruNearEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruNearEvictionPolicySelfTest.java
index 6a2e05a..ea8f060 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruNearEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheLruNearEvictionPolicySelfTest.java
@@ -120,7 +120,7 @@ public class GridCacheLruNearEvictionPolicySelfTest extends GridCommonAbstractTe
             info("Getting " + cnt + " keys from cache.");
 
             for (int i = 0; i < cnt; i++) {
-                GridCache<Integer, String> cache = grid(rand.nextInt(GRID_COUNT)).cache(null);
+                IgniteCache<Integer, String> cache = grid(rand.nextInt(GRID_COUNT)).jcache(null);
 
                 assertTrue(cache.get(i).equals(Integer.toString(i)));
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheNearOnlyLruNearEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheNearOnlyLruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheNearOnlyLruNearEvictionPolicySelfTest.java
index 6f60e56..a381082 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheNearOnlyLruNearEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/GridCacheNearOnlyLruNearEvictionPolicySelfTest.java
@@ -152,7 +152,7 @@ public class GridCacheNearOnlyLruNearEvictionPolicySelfTest extends GridCommonAb
             info("Getting " + cnt + " keys from cache.");
 
             for (int i = 0; i < cnt; i++) {
-                GridCache<Integer, String> cache = grid(0).cache(null);
+                IgniteCache<Integer, String> cache = grid(0).jcache(null);
 
                 assertTrue(cache.get(i).equals(Integer.toString(i)));
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/GridCacheRandomEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/GridCacheRandomEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/GridCacheRandomEvictionPolicySelfTest.java
index 66b85ef..140204e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/GridCacheRandomEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/GridCacheRandomEvictionPolicySelfTest.java
@@ -46,10 +46,10 @@ public class GridCacheRandomEvictionPolicySelfTest extends
             for (int i = 0; i < keys; i++) {
                 String s = Integer.toString(i);
 
-                g.cache(null).put(s, s);
+                g.jcache(null).put(s, s);
             }
 
-            assert g.cache(null).size() <= max;
+            assert g.jcache(null).size() <= max;
         }
         finally {
             stopAllGrids();
@@ -84,15 +84,15 @@ public class GridCacheRandomEvictionPolicySelfTest extends
                 int j = rand.nextInt(t.length);
 
                 if (rmv)
-                    g.cache(null).remove(t[j]);
+                    g.jcache(null).remove(t[j]);
                 else
-                    g.cache(null).put(t[j], t[j]);
+                    g.jcache(null).put(t[j], t[j]);
 
                 if (i % 1000 == 0)
                     info("Stats [cntr=" + i + ", total=" + runs + ']');
             }
 
-            assert g.cache(null).size() <= max;
+            assert g.jcache(null).size() <= max;
 
             info(policy(0));
         }
@@ -193,9 +193,9 @@ public class GridCacheRandomEvictionPolicySelfTest extends
                         int j = rand.nextInt(t.length);
 
                         if (rmv)
-                            g.cache(null).remove(t[j]);
+                            g.jcache(null).remove(t[j]);
                         else
-                            g.cache(null).put(t[j], t[j]);
+                            g.jcache(null).put(t[j], t[j]);
 
                         if (i != 0 && i % 1000 == 0)
                             info("Stats [cntr=" + i + ", total=" + runs + ']');
@@ -205,7 +205,7 @@ public class GridCacheRandomEvictionPolicySelfTest extends
                 }
             }, 10);
 
-            assert g.cache(null).size() <= max;
+            assert g.jcache(null).size() <= max;
 
             info(policy(0));
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
index 75dd949..f26141f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
@@ -43,10 +43,10 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
     private static Ignite ignite;
 
     /** Regular cache. */
-    private static GridCache<Integer, Object> cache;
+    private static IgniteCache<Integer, Object> cache;
 
     /** Offheap cache. */
-    private static GridCache<Integer, Object> cacheOffheap;
+    private static IgniteCache<Integer, Object> cacheOffheap;
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
@@ -85,8 +85,8 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
     @Override protected void beforeTestsStarted() throws Exception {
         ignite = startGrid(1);
 
-        cache = ignite.cache(CACHE_REGULAR);
-        cacheOffheap = ignite.cache(CACHE_OFFHEAP);
+        cache = ignite.jcache(CACHE_REGULAR);
+        cacheOffheap = ignite.jcache(CACHE_OFFHEAP);
     }
 
     /** {@inheritDoc} */
@@ -189,14 +189,11 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
         assert Arrays.equals(val1, (byte[])cache.get(KEY_1));
         assert F.eq(val2, cache.get(KEY_2));
 
-        assert cache.evict(KEY_1);
-        assert cache.evict(KEY_2);
+        cache.evict(KEY_1);
+        cache.evict(KEY_2);
 
         assert cache.peek(KEY_1) == null;
         assert cache.peek(KEY_2) == null;
-
-        assert Arrays.equals(val1, (byte[])cache.promote(KEY_1));
-        assert F.eq(val2, cache.promote(KEY_2));
     }
 
     /**
@@ -208,7 +205,7 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
      * @param val Value.
      * @throws Exception If failed.
      */
-    private void testTransaction(GridCache<Integer, Object> cache, IgniteTxConcurrency concurrency,
+    private void testTransaction(IgniteCache<Integer, Object> cache, IgniteTxConcurrency concurrency,
         Integer key, byte[] val) throws Exception {
         testTransactionMixed(cache, concurrency, key, val, null, null);
     }
@@ -224,10 +221,10 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
      * @param val2 Value 2.
      * @throws Exception If failed.
      */
-    private void testTransactionMixed(GridCache<Integer, Object> cache, IgniteTxConcurrency concurrency,
+    private void testTransactionMixed(IgniteCache<Integer, Object> cache, IgniteTxConcurrency concurrency,
         Integer key1, byte[] val1, @Nullable Integer key2, @Nullable Object val2) throws Exception {
 
-        IgniteTx tx = cache.txStart(concurrency, REPEATABLE_READ);
+        IgniteTx tx = ignite.transactions().txStart(concurrency, REPEATABLE_READ);
 
         try {
             cache.put(key1, val1);
@@ -241,7 +238,7 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
             tx.close();
         }
 
-        tx = cache.txStart(concurrency, REPEATABLE_READ);
+        tx = ignite.transactions().txStart(concurrency, REPEATABLE_READ);
 
         try {
             assert Arrays.equals(val1, (byte[])cache.get(key1));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
index c8aff97..c1b62f4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
@@ -51,7 +51,7 @@ public class GridCacheLocalLoadAllSelfTest extends GridCommonAbstractTest {
 
         assert ignite != null;
 
-        ignite.cache("test-cache").getAll(Collections.singleton(1));
+        ignite.jcache("test-cache").getAll(Collections.singleton(1));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java
index 8a09803..b50b4c8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java
@@ -133,9 +133,9 @@ public class GridCacheLocalTxTimeoutSelfTest extends GridCommonAbstractTest {
         IgniteTx tx = null;
 
         try {
-            GridCache<Integer, String> cache = ignite.cache(null);
+            IgniteCache<Integer, String> cache = ignite.jcache(null);
 
-            tx = cache.txStart(concurrency, isolation, 50, 0);
+            tx = ignite.transactions().txStart(concurrency, isolation, 50, 0);
 
             cache.put(1, "1");
 
@@ -145,20 +145,13 @@ public class GridCacheLocalTxTimeoutSelfTest extends GridCommonAbstractTest {
 
             tx.commit();
         }
-        catch (IgniteTxOptimisticCheckedException e) {
+        catch (IgniteException e) {
             info("Received expected optimistic exception: " + e.getMessage());
 
             wasEx = true;
 
             tx.rollback();
         }
-        catch (IgniteTxTimeoutCheckedException e) {
-            info("Received expected timeout exception: " + e.getMessage());
-
-            wasEx = true;
-
-            tx.rollback();
-        }
 
         assert wasEx;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderImplSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderImplSelfTest.java
index 788dea1..e433856 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderImplSelfTest.java
@@ -148,7 +148,7 @@ public class GridDataLoaderImplSelfTest extends GridCommonAbstractTest {
 
             Random rnd = new Random();
 
-            GridCache<Integer, String> c = g0.cache(null);
+            IgniteCache<Integer, String> c = g0.jcache(null);
 
             for (int i = 0; i < KEYS_COUNT; i ++) {
                 Integer k = rnd.nextInt(KEYS_COUNT);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
index b0d62e9..267d568 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
@@ -234,8 +234,8 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
 
             f1.get();
 
-            int s2 = g2.cache(null).primaryKeySet().size();
-            int s3 = g3.cache(null).primaryKeySet().size();
+            int s2 = internalCache(2).primaryKeySet().size();
+            int s3 = internalCache(3).primaryKeySet().size();
             int total = threads * cnt;
 
             assertEquals(total, s2 + s3);
@@ -272,8 +272,8 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
 
             f2.get();
 
-            s2 = g2.cache(null).primaryKeySet().size();
-            s3 = g3.cache(null).primaryKeySet().size();
+            s2 = internalCache(2).primaryKeySet().size();
+            s3 = internalCache(3).primaryKeySet().size();
 
             assert s2 == 0 && s3 == 0 : "Incorrect entries count [s2=" + s2 + ", s3=" + s3 + ']';
         }
@@ -465,8 +465,6 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
             finally {
                 ldr.close(false);
             }
-
-            info("Cache size on second grid: " + grid(nodesCntNoCache + 1).cache(null).primaryKeySet().size());
         }
         finally {
             stopAllGrids();
@@ -638,7 +636,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
         try {
             Ignite g = startGrid();
 
-            final GridCache<Integer, Integer> c = g.cache(null);
+            final IgniteCache<Integer, Integer> c = g.jcache(null);
 
             final IgniteDataLoader<Integer, Integer> ldr = g.dataLoader(null);
 
@@ -690,7 +688,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
         try {
             Ignite g = startGrid();
 
-            GridCache<Integer, Integer> c = g.cache(null);
+            IgniteCache<Integer, Integer> c = g.jcache(null);
 
             IgniteDataLoader<Integer, Integer> ldr = g.dataLoader(null);
 
@@ -735,7 +733,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
                 }
             }, EVT_CACHE_OBJECT_PUT);
 
-            GridCache<Integer, Integer> c = g.cache(null);
+            IgniteCache<Integer, Integer> c = g.jcache(null);
 
             assertTrue(c.isEmpty());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsCacheSelfTest.java
index 8089b11..8b82e3a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsCacheSelfTest.java
@@ -114,7 +114,7 @@ public class GridGgfsCacheSelfTest extends GridGgfsCommonAbstractTest {
 
         GridTestUtils.assertThrows(log(), new Callable<Object>() {
             @Override public Object call() throws Exception {
-                g.cache(META_CACHE_NAME);
+                g.jcache(META_CACHE_NAME);
 
                 return null;
             }
@@ -122,12 +122,12 @@ public class GridGgfsCacheSelfTest extends GridGgfsCommonAbstractTest {
 
         GridTestUtils.assertThrows(log(), new Callable<Object>() {
             @Override public Object call() throws Exception {
-                g.cache(DATA_CACHE_NAME);
+                g.jcache(DATA_CACHE_NAME);
 
                 return null;
             }
         }, IllegalStateException.class, null);
 
-        assert g.cache(CACHE_NAME) != null;
+        assert g.jcache(CACHE_NAME) != null;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java
index 0c74458..1e2ae2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java
@@ -316,7 +316,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
         final Integer affKey = 1;
 
         // Store a cache key.
-        g.cache(CACHE_NAME).put(affKey, affKey.toString());
+        g.jcache(CACHE_NAME).put(affKey, affKey.toString());
 
         String name = "serviceAffinity";
 
@@ -549,7 +549,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
         @Override public void init(ServiceContext ctx) throws Exception {
             X.println("Initializing affinity service for key: " + affKey);
 
-            ClusterNode n = g.cache(CACHE_NAME).affinity().mapKeyToNode(affKey);
+            ClusterNode n = g.affinity(CACHE_NAME).mapKeyToNode(affKey);
 
             assertNotNull(n);
             assertTrue(n.isLocal());
@@ -570,7 +570,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
         private Ignite ignite;
 
         /** */
-        private GridCache<String, Value> cache;
+        private IgniteCache<String, Value> cache;
 
         /** Cache key. */
         private String key;
@@ -592,7 +592,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
                     Value val = cache.get(key);
 
                     if (val == null) {
-                        Value old = cache.putIfAbsent(key, val = new Value(0));
+                        Value old = cache.getAndPutIfAbsent(key, val = new Value(0));
 
                         if (old != null)
                             val = old;
@@ -633,7 +633,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
 
             key = ctx.name();
 
-            cache = ignite.cache(CACHE_NAME);
+            cache = ignite.jcache(CACHE_NAME);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae5198fc/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
index 77b2ea5..a8bc502 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
@@ -87,7 +87,7 @@ public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorA
         final Integer affKey = 1;
 
         // Store a cache key.
-        g.cache(CACHE_NAME).put(affKey, affKey.toString());
+        g.jcache(CACHE_NAME).put(affKey, affKey.toString());
 
         String name = "serviceAffinityUpdateTopology";
 


Mime
View raw message