ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-56 Migration tests to IgniteCache
Date Mon, 09 Feb 2015 16:55:37 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-96-tests ae5198fc4 -> a5a5471fd


# IGNITE-56 Migration tests to IgniteCache


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

Branch: refs/heads/ignite-96-tests
Commit: a5a5471fd2c6269e28fb7c26f7aa8e7858e7c702
Parents: ae5198f
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon Feb 9 19:55:19 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon Feb 9 19:55:32 2015 +0300

----------------------------------------------------------------------
 .../GridCacheMultiNodeAbstractTest.java         | 175 ++++++-------------
 .../GridCacheMultiNodeLockAbstractTest.java     |  32 ++--
 ...dCacheMultithreadedFailoverAbstractTest.java |  24 +--
 .../GridCacheNodeFailureAbstractTest.java       |  14 +-
 ...dCachePartitionedAffinityFilterSelfTest.java |   5 +-
 .../GridCachePreloadEventsAbstractSelfTest.java |   4 +-
 ...GridCachePreloadRestartAbstractSelfTest.java |  20 +--
 .../GridCacheTransformEventSelfTest.java        |   6 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  26 +--
 ...iteTxConsistencyRestartAbstractSelfTest.java |  12 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |  10 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |  24 +--
 .../IgniteTxTimeoutAbstractTest.java            |   8 +
 13 files changed, 156 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
index 39174ff..45e16ba 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
@@ -33,6 +33,7 @@ import org.apache.ignite.testframework.junits.common.*;
 
 import java.util.*;
 import java.util.concurrent.*;
+import java.util.concurrent.locks.*;
 
 import static java.util.concurrent.TimeUnit.*;
 import static org.apache.ignite.events.EventType.*;
@@ -51,13 +52,22 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
     private static Ignite ignite3;
 
     /** Cache 1. */
-    private static GridCache<Integer, String> cache1;
+    private static IgniteCache<Integer, String> cache1;
 
     /** Cache 2. */
-    private static GridCache<Integer, String> cache2;
+    private static IgniteCache<Integer, String> cache2;
 
     /** Cache 3. */
-    private static GridCache<Integer, String> cache3;
+    private static IgniteCache<Integer, String> cache3;
+
+    /** Cache 1. */
+    private static IgniteCache<Integer, String> cache1Async;
+
+    /** Cache 2. */
+    private static IgniteCache<Integer, String> cache2Async;
+
+    /** Cache 3. */
+    private static IgniteCache<Integer, String> cache3Async;
 
     /** */
     private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -84,9 +94,13 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         ignite2 = startGrid(2);
         ignite3 = startGrid(3);
 
-        cache1 = ignite1.cache(null);
-        cache2 = ignite2.cache(null);
-        cache3 = ignite3.cache(null);
+        cache1 = ignite1.jcache(null);
+        cache2 = ignite2.jcache(null);
+        cache3 = ignite3.jcache(null);
+
+        cache1Async = cache1.withAsync();
+        cache2Async = cache2.withAsync();
+        cache3Async = cache3.withAsync();
     }
 
     /** {@inheritDoc} */
@@ -183,7 +197,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         for (Ignite ignite : ignites)
             addListener(ignite, lsnr);
 
-        GridCache<Integer, String> cache1 = ignites[0].cache(null);
+        IgniteCache<Integer, String> cache1 = ignites[0].jcache(null);
 
         for (int i = 1; i <= cnt; i++)
             cache1.put(i, "val" + i);
@@ -198,7 +212,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         latch.await(10, SECONDS);
 
         for (Ignite ignite : ignites) {
-            GridCache<Integer, String> cache = ignite.cache(null);
+            IgniteCache<Integer, String> cache = ignite.jcache(null);
 
             if (cache == cache1)
                 continue;
@@ -211,9 +225,9 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
             }
         }
 
-        assert !cache1.isLocked(1);
-        assert !cache1.isLocked(2);
-        assert !cache1.isLocked(3);
+        assert !cache1.isLocalLocked(1, false);
+        assert !cache1.isLocalLocked(2, false);
+        assert !cache1.isLocalLocked(3, false);
 
         for (Ignite ignite : ignites)
             ignite.events().stopLocalListen(lsnr);
@@ -233,121 +247,36 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         addListener(ignite2, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
         addListener(ignite3, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
 
-        IgniteInternalFuture<Boolean> f1 = cache1.lockAsync(1, 0L);
+        Lock lock = cache1.lock(1);
 
-        assert f1.get(10000);
+        assert lock.tryLock(10000, MILLISECONDS);
 
-        assert cache1.isLocked(1);
-        assert cache2.isLocked(1);
-        assert cache3.isLocked(1);
+        try {
+            assert cache1.isLocalLocked(1, false);
+            assert cache2.isLocalLocked(1, false);
+            assert cache3.isLocalLocked(1, false);
 
-        assert cache1.isLockedByThread(1);
-        assert !cache2.isLockedByThread(1);
-        assert !cache3.isLockedByThread(1);
+            assert cache1.isLocalLocked(1, true);
+            assert !cache2.isLocalLocked(1, true);
+            assert !cache3.isLocalLocked(1, true);
 
-        info("Acquired lock for cache1.");
-
-        cache1.unlockAll(F.asList(1));
+            info("Acquired lock for cache1.");
+        }
+        finally {
+            lock.unlock();
+        }
 
         Thread.sleep(50);
 
         unlockLsnr.latch.await(10, SECONDS);
 
-        assert !cache1.isLocked(1);
-        assert !cache2.isLocked(2);
-        assert !cache3.isLocked(3);
+        assert !cache1.isLocalLocked(1, false);
+        assert !cache2.isLocalLocked(2, false);
+        assert !cache3.isLocalLocked(3, false);
 
-        assert !cache1.isLockedByThread(1);
-        assert !cache2.isLockedByThread(1);
-        assert !cache3.isLockedByThread(1);
-    }
-
-    /**
-     * Concurrent test for asynchronous locks.
-     *
-     * @throws Exception If test fails.
-     */
-    @SuppressWarnings({"BusyWait"})
-    public void testConcurrentLockAsync() throws Exception {
-        CacheEventListener unlockLsnr = new CacheEventListener(new CountDownLatch(9), EVT_CACHE_OBJECT_UNLOCKED);
-
-        addListener(ignite1, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
-        addListener(ignite2, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
-        addListener(ignite3, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
-
-        IgniteInternalFuture<Boolean> f1 = cache1.lockAsync(1, 0L);
-        IgniteInternalFuture<Boolean> f2 = cache2.lockAsync(1, 0L);
-        IgniteInternalFuture<Boolean> f3 = cache3.lockAsync(1, 0L);
-
-        boolean l1 = false;
-        boolean l2 = false;
-        boolean l3 = false;
-
-        int cnt = 0;
-
-        while (!l1 || !l2 || !l3) {
-            if (!l1 && f1.isDone()) {
-                assert cache1.isLocked(1);
-                assert cache2.isLocked(1);
-                assert cache3.isLocked(1);
-
-                assert cache1.isLockedByThread(1);
-                assert !cache2.isLockedByThread(1);
-                assert !cache3.isLockedByThread(1);
-
-                info("Acquired lock for cache1.");
-
-                cache1.unlockAll(F.asList(1));
-
-                l1 = true;
-            }
-
-            if (!l2 && f2.isDone()) {
-                assert cache1.isLocked(1);
-                assert cache2.isLocked(1);
-                assert cache3.isLocked(1);
-
-                assert !cache1.isLockedByThread(1);
-                assert cache2.isLockedByThread(1);
-                assert !cache3.isLockedByThread(1);
-
-                info("Acquired lock for cache2.");
-
-                cache2.unlockAll(F.asList(1));
-
-                l2 = true;
-            }
-
-            if (!l3 && f3.isDone()) {
-                assert cache1.isLocked(1);
-                assert cache2.isLocked(1);
-                assert cache3.isLocked(1);
-
-                assert !cache1.isLockedByThread(1);
-                assert !cache2.isLockedByThread(1);
-                assert cache3.isLockedByThread(1);
-
-                info("Acquired lock for cache3.");
-
-                cache3.unlockAll(F.asList(1));
-
-                l3 = true;
-            }
-
-            info("Acquired locks [cnt=" + ++cnt + ", l1=" + l1 + ", l2=" + l2 + ", l3=" +
l3 + ']');
-
-            Thread.sleep(50);
-        }
-
-        unlockLsnr.latch.await(10, SECONDS);
-
-        assert !cache1.isLocked(1);
-        assert !cache2.isLocked(2);
-        assert !cache3.isLocked(3);
-
-        assert !cache1.isLockedByThread(1);
-        assert !cache2.isLockedByThread(1);
-        assert !cache3.isLockedByThread(1);
+        assert !cache1.isLocalLocked(1, true);
+        assert !cache2.isLocalLocked(1, true);
+        assert !cache3.isLocalLocked(1, true);
     }
 
     /**
@@ -362,9 +291,17 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         addListener(ignite2, lsnr);
         addListener(ignite3, lsnr);
 
-        IgniteInternalFuture<String> f1 = cache1.putAsync(2, "val1");
-        IgniteInternalFuture<String> f2 = cache2.putAsync(2, "val2");
-        IgniteInternalFuture<String> f3 = cache3.putAsync(2, "val3");
+        cache1Async.getAndPut(2, "val1");
+
+        IgniteFuture<String> f1 = cache1Async.future();
+
+        cache2Async.getAndPut(2, "val2");
+
+        IgniteFuture<String> f2 = cache2Async.future();
+
+        cache3Async.getAndPut(2, "val3");
+
+        IgniteFuture<String> f3 = cache3Async.future();
 
         String v1 = f1.get(20000);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
index 1bd7d22..7b84925 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
@@ -241,7 +241,8 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
                 ", de2=" + dht2.peekEx(key) + ']';
         }
 
-        return "Entries [e1=" + ignite1.cache(null).entry(key) + ", e2=" + ignite2.cache(null).entry(key)
+ ']';
+        return "Entries [e1=" + ((IgniteKernal)ignite1).internalCache(null).entry(key)
+            + ", e2=" + ((IgniteKernal)ignite2).internalCache(null).entry(key) + ']';
     }
 
     /**
@@ -252,18 +253,17 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
         IgniteCache<Integer, String> cache2 = ignite2.jcache(null);
 
         Lock lock1_1 = cache1.lock(1);
+        Lock lock2_1 = cache2.lock(1);
 
         lock1_1.lock();
 
-        assert cache1.isLocalLocked(1, false) : entries(1);
-        assert cache1.isLocalLocked(1, true);
-
-        assert cache2.isLocalLocked(1, false) : entries(1);
-        assert !cache2.isLocalLocked(1, true);
+        try {
+            assert cache1.isLocalLocked(1, false) : entries(1);
+            assert cache1.isLocalLocked(1, true);
 
-        Lock lock2_1 = cache2.lock(1);
+            assert cache2.isLocalLocked(1, false) : entries(1);
+            assert !cache2.isLocalLocked(1, true);
 
-        try {
             assert !lock2_1.tryLock();
 
             assert cache2.isLocalLocked(1, false) : entries(1);
@@ -275,19 +275,19 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
             checkUnlocked(cache1, 1);
         }
 
-        lock2_1.lock();
+        CountDownLatch latch = new CountDownLatch(1);
 
-        assert cache2.isLocalLocked(1, false) : entries(1);
-        assert cache2.isLocalLocked(1, true);
+        lock2_1.lock();
 
-        assert cache1.isLocalLocked(1, false) : entries(1);
-        assert !cache1.isLocalLocked(1, true);
+        try {
+            assert cache2.isLocalLocked(1, false) : entries(1);
+            assert cache2.isLocalLocked(1, true);
 
-        CountDownLatch latch = new CountDownLatch(1);
+            assert cache1.isLocalLocked(1, false) : entries(1);
+            assert !cache1.isLocalLocked(1, true);
 
-        addListener(ignite1, new UnlockListener(latch, 1));
+            addListener(ignite1, new UnlockListener(latch, 1));
 
-        try {
             assert !lock1_1.tryLock();
 
             assert cache1.isLocalLocked(1, false) : entries(1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
index 556e9c9..cfcd0bc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
@@ -278,13 +278,13 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
 
                     Ignite ignite = G.ignite(nodeName(0));
 
-                    GridCache<Integer, Integer> cache = ignite.cache(CACHE_NAME);
+                    IgniteCache<Integer, Integer> cache = ignite.jcache(CACHE_NAME);
 
                     int startKey = keysPerThread * idx;
                     int endKey = keysPerThread * (idx + 1);
 
                     Map<Integer, Integer> putMap = new HashMap<>();
-                    Collection<Integer> rmvSet = new HashSet<>();
+                    Set<Integer> rmvSet = new HashSet<>();
 
                     while (!stop.get()) {
                         for (int i = 0; i < 100; i++) {
@@ -302,7 +302,7 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
                             }
                         }
                         try {
-                            IgniteTx tx = atomicityMode() == TRANSACTIONAL ? cache.txStart()
: null;
+                            IgniteTx tx = atomicityMode() == TRANSACTIONAL ? ignite.transactions().txStart()
: null;
 
                             try {
                                 cache.putAll(putMap);
@@ -321,7 +321,7 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
                             for (Integer key : rmvSet)
                                 expVals.remove(key);
                         }
-                        catch (IgniteCheckedException e) {
+                        catch (Exception e) {
                             log.error("Cache update failed [putMap=" + putMap+ ", rmvSet="
+ rmvSet + ']', e);
 
                             errCtr.incrementAndGet();
@@ -501,18 +501,18 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
      */
     @SuppressWarnings({"TooBroadScope", "ConstantIfStatement"})
     private boolean compareCaches(Map<Integer, Integer> expVals) throws Exception {
-        List<GridCache<Integer, Integer>> caches = new ArrayList<>(dataNodes());
+        List<IgniteCache<Integer, Integer>> caches = new ArrayList<>(dataNodes());
         List<GridDhtCacheAdapter<Integer, Integer>> dhtCaches = null;
 
         for (int i = 0 ; i < dataNodes(); i++) {
-            GridCache<Integer, Integer> cache = G.ignite(nodeName(i)).cache(CACHE_NAME);
+            IgniteCache<Integer, Integer> cache = G.ignite(nodeName(i)).jcache(CACHE_NAME);
 
             assert cache != null;
 
             caches.add(cache);
 
             GridCacheAdapter<Integer, Integer> cache0 =
-                (GridCacheAdapter<Integer, Integer>)cache.<Integer, Integer>cache();
+                (GridCacheAdapter<Integer, Integer>)cache.unwrap(Ignite.class).<Integer,
Integer>cache(CACHE_NAME);
 
             if (cache0.isNear()) {
                 if (dhtCaches == null)
@@ -527,7 +527,8 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
         Collection<Integer> dhtCacheKeys = new HashSet<>();
 
         for (int i = 0; i < dataNodes(); i++) {
-            cacheKeys.addAll(caches.get(i).keySet());
+            for (Cache.Entry<Integer, Integer> entry : caches.get(i))
+                cacheKeys.add(entry.getKey());
 
             if (dhtCaches != null)
                 dhtCacheKeys.addAll(dhtCaches.get(i).keySet());
@@ -588,13 +589,12 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
 
             for (Integer key : failedKeys) {
                 for (int i = 0; i < dataNodes(); i++) {
-                    Cache.Entry<Integer, Integer> e = caches.get(i).entry(key);
+                    IgniteCache<Integer, Integer> cache = caches.get(i);
 
                     UUID nodeId = G.ignite(nodeName(i)).cluster().localNode().id();
 
-                    if (!F.eq(e.getValue(), expVals.get(key)))
-                        log.error("key=" + key + ", expVal=" + expVals.get(key) + ", cacheVal="
+ e.getValue() +
-                            ", nodeId=" + nodeId);
+                    if (!F.eq(cache.get(key), expVals.get(key)))
+                        log.error("key=" + key + ", expVal=" + expVals.get(key) + ", nodeId="
+ nodeId);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
index 03f2057..275dd5f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
@@ -115,9 +115,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
                 IGNITEs.set(i, startGrid(i));
             }
 
-            Cache.Entry e = cache(i).entry(KEY);
-
-            assert !cache(i).isLocked(KEY) : "Entry is locked for grid [idx=" + i + ", entry="
+ e + ']';
+            assert !jcache(i).isLocalLocked(KEY, false) : "Entry is locked for grid [idx="
+ i + ']';
         }
     }
 
@@ -130,6 +128,14 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
     }
 
     /**
+     * @param i Grid index.
+     * @return Cache.
+     */
+    @Override protected <K, V> IgniteCache<K, V> jcache(int i) {
+        return IGNITEs.get(i).jcache(null);
+    }
+
+    /**
      * @throws IgniteCheckedException If test failed.
      */
     public void testPessimisticReadCommitted() throws Throwable {
@@ -233,7 +239,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
 
         info("Grid will be stopped: " + idx);
 
-        info("Nodes for key [id=" + grid(idx).cache(null).affinity().mapKeyToPrimaryAndBackups(KEY)
+
+        info("Nodes for key [id=" + grid(idx).affinity(null).mapKeyToPrimaryAndBackups(KEY)
+
             ", key=" + KEY + ']');
 
         IgniteCache<Integer, String> cache = jcache(idx);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
index 98c7fee..b78857d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache.distributed;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.affinity.consistenthash.*;
@@ -126,12 +127,12 @@ public class GridCachePartitionedAffinityFilterSelfTest extends GridCommonAbstra
 
         CacheAffinityFunction aff = cacheConfiguration(grid(0).configuration(), null).getAffinity();
 
-        GridCache<Object, Object> cache = grid(0).cache(null);
+        IgniteCache<Object, Object> cache = grid(0).jcache(null);
 
         for (int i = 0; i < partCnt; i++) {
             assertEquals(i, aff.partition(i));
 
-            Collection<ClusterNode> nodes = cache.affinity().mapKeyToPrimaryAndBackups(i);
+            Collection<ClusterNode> nodes = affinity(cache).mapKeyToPrimaryAndBackups(i);
 
             assertEquals(2, nodes.size());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
index 079792a..cc0d899 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java
@@ -96,7 +96,7 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA
     public void testPreloadEvents() throws Exception {
         Ignite g1 = startGrid("g1");
 
-        GridCache<Integer, String> cache = g1.cache(null);
+        IgniteCache<Integer, String> cache = g1.jcache(null);
 
         cache.put(1, "val1");
         cache.put(2, "val2");
@@ -120,7 +120,7 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA
         for (Event evt : evts) {
             CacheEvent cacheEvt = (CacheEvent)evt;
             assertEquals(EVT_CACHE_PRELOAD_OBJECT_LOADED, cacheEvt.type());
-            assertEquals(g.cache(null).name(), cacheEvt.cacheName());
+            assertEquals(g.jcache(null).getName(), cacheEvt.cacheName());
             assertEquals(g.cluster().localNode().id(), cacheEvt.node().id());
             assertEquals(g.cluster().localNode().id(), cacheEvt.eventNode().id());
             assertTrue(cacheEvt.hasNewValue());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
index 51e505f..fffb39c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
@@ -217,25 +217,25 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends
GridCommon
     /**
      * @param c Cache projection.
      */
-    private void affinityBeforeStop(GridCache<Integer, String> c) {
+    private void affinityBeforeStop(IgniteCache<Integer, String> c) {
         for (int key = 0; key < keyCnt; key++) {
             int part = affinity(c).partition(key);
 
             info("Affinity nodes before stop [key=" + key + ", partition" + part + ", nodes="
+
-                U.nodeIds(c.affinity().mapPartitionToPrimaryAndBackups(part)) + ']');
+                U.nodeIds(affinity(c).mapPartitionToPrimaryAndBackups(part)) + ']');
         }
     }
 
     /**
      * @param c Cache projection.
      */
-    private void affinityAfterStart(GridCache<Integer, String> c) {
+    private void affinityAfterStart(IgniteCache<Integer, String> c) {
         if (DEBUG) {
             for (int key = 0; key < keyCnt; key++) {
                 int part = affinity(c).partition(key);
 
                 info("Affinity odes after start [key=" + key + ", partition" + part + ",
nodes=" +
-                    U.nodeIds(c.affinity().mapPartitionToPrimaryAndBackups(part)) + ']');
+                    U.nodeIds(affinity(c).mapPartitionToPrimaryAndBackups(part)) + ']');
             }
         }
     }
@@ -249,11 +249,11 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends
GridCommon
         startGrids();
 
         try {
-            GridCache<Integer, String> c = grid(idx).cache(CACHE_NAME);
+            IgniteCache<Integer, String> c = grid(idx).jcache(CACHE_NAME);
 
             for (int j = 0; j < retries; j++) {
                 for (int i = 0; i < keyCnt; i++)
-                    c.putx(i, Integer.toString(i));
+                    c.put(i, Integer.toString(i));
 
                 info("Stored items.");
 
@@ -269,7 +269,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends
GridCommon
 
                 Ignite ignite = startGrid(idx);
 
-                c = ignite.cache(CACHE_NAME);
+                c = ignite.jcache(CACHE_NAME);
 
                 affinityAfterStart(c);
 
@@ -286,7 +286,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends
GridCommon
      * @param attempt Attempt.
      * @throws Exception If failed.
      */
-    private void checkGet(GridCache<Integer, String> c, int attempt) throws Exception
{
+    private void checkGet(IgniteCache<Integer, String> c, int attempt) throws Exception
{
         for (int i = 0; i < keyCnt; i++) {
             String v = c.get(i);
 
@@ -312,11 +312,11 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends
GridCommon
      * @param key Key.
      * @param attempt Attempt.
      */
-    private void printFailureDetails(GridCache<Integer, String> c, int key, int attempt)
{
+    private void printFailureDetails(IgniteCache<Integer, String> c, int key, int attempt)
{
         error("*** Failure details ***");
         error("Key: " + key);
         error("Partition: " + c.configuration().getAffinity().partition(key));
         error("Attempt: " + attempt);
-        error("Node: " + c.gridProjection().ignite().cluster().localNode().id());
+        error("Node: " + c.unwrap(Ignite.class).cluster().localNode().id());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
index 4c56428..2777111 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
@@ -242,7 +242,7 @@ public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest
{
      * @return {@code True} if grid is primary for given key.
      */
     private boolean primary(int gridIdx, Object key) {
-        CacheAffinity<Object> aff = grid(0).cache(CACHE_NAME).affinity();
+        CacheAffinity<Object> aff = grid(0).affinity(CACHE_NAME);
 
         return aff.isPrimary(grid(gridIdx).cluster().localNode(), key);
     }
@@ -253,7 +253,7 @@ public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest
{
      * @return {@code True} if grid is primary for given key.
      */
     private boolean backup(int gridIdx, Object key) {
-        CacheAffinity<Object> aff = grid(0).cache(CACHE_NAME).affinity();
+        CacheAffinity<Object> aff = grid(0).affinity(CACHE_NAME);
 
         return aff.isBackup(grid(gridIdx).cluster().localNode(), key);
     }
@@ -541,7 +541,7 @@ public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest
{
         else if (cacheMode == REPLICATED) {
             for (int key : keys) {
                 if (primaryOnly)
-                    res.add(grid(0).cache(CACHE_NAME).affinity().mapKeyToNode(key).id());
+                    res.add(grid(0).affinity(CACHE_NAME).mapKeyToNode(key).id());
                 else
                     res.addAll(Arrays.asList(ids));
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
index 417eebf..d9c51c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
@@ -100,9 +100,9 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest
{
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).cache("cacheA").removeAll();
-        grid(0).cache("cacheB").removeAll();
-        grid(0).cache("cacheC").removeAll();
+        grid(0).jcache("cacheA").removeAll();
+        grid(0).jcache("cacheB").removeAll();
+        grid(0).jcache("cacheC").removeAll();
     }
 
     /**
@@ -126,8 +126,8 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest
{
         Collection<String> evts = firstStore.events();
 
         try (IgniteTx tx = grid.transactions().txStart()) {
-            GridCache<Object, Object> cacheA = grid.cache("cacheA");
-            GridCache<Object, Object> cacheB = grid.cache("cacheB");
+            IgniteCache<Object, Object> cacheA = grid.jcache("cacheA");
+            IgniteCache<Object, Object> cacheB = grid.jcache("cacheB");
 
             cacheA.put("1", "1");
             cacheA.put("2", "2");
@@ -167,8 +167,8 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest
{
         IgniteEx grid = grid(0);
 
         try (IgniteTx ignored = grid.transactions().txStart()) {
-            GridCache<Object, Object> cacheA = grid.cache("cacheA");
-            GridCache<Object, Object> cacheC = grid.cache("cacheC");
+            IgniteCache<Object, Object> cacheA = grid.jcache("cacheA");
+            IgniteCache<Object, Object> cacheC = grid.jcache("cacheC");
 
             cacheA.put("1", "2");
 
@@ -176,8 +176,8 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest
{
 
             fail("Must not allow to enlist caches with different stores to one transaction");
         }
-        catch (IgniteCheckedException e) {
-            assertTrue(e.getMessage().startsWith("Failed to enlist new cache to existing
transaction"));
+        catch (CacheException e) {
+            assertTrue(e.getMessage().contains("Failed to enlist new cache to existing transaction"));
         }
     }
 
@@ -188,8 +188,8 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest
{
         IgniteEx grid = grid(0);
 
         try (IgniteTx ignored = grid.transactions().txStart()) {
-            GridCache<Object, Object> cacheA = grid.cache("cacheA");
-            GridCache<Object, Object> cacheC = grid.cache("cacheD");
+            IgniteCache<Object, Object> cacheA = grid.jcache("cacheA");
+            IgniteCache<Object, Object> cacheC = grid.jcache("cacheD");
 
             cacheA.put("1", "2");
 
@@ -197,8 +197,8 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest
{
 
             fail("Must not allow to enlist caches with different stores to one transaction");
         }
-        catch (IgniteCheckedException e) {
-            assertTrue(e.getMessage().startsWith("Failed to enlist new cache to existing
transaction"));
+        catch (CacheException e) {
+            assertTrue(e.getMessage().contains("Failed to enlist new cache to existing transaction"));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
index 7d792c1..1a3a870 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
@@ -145,7 +145,7 @@ public abstract class IgniteTxConsistencyRestartAbstractSelfTest extends
GridCom
             try {
                 IgniteKernal grid = (IgniteKernal)grid(idx);
 
-                GridCache<Integer, Integer> cache = grid.cache(null);
+                IgniteCache<Integer, Integer> cache = grid.jcache(null);
 
                 List<Integer> keys = new ArrayList<>();
 
@@ -156,8 +156,8 @@ public abstract class IgniteTxConsistencyRestartAbstractSelfTest extends
GridCom
 
                 Collections.sort(keys);
 
-                try (IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) {
-                    Map<Integer, Integer> map = cache.getAll(keys);
+                try (IgniteTx tx = grid.transactions().txStart(PESSIMISTIC, REPEATABLE_READ))
{
+                    Map<Integer, Integer> map = cache.getAll(new LinkedHashSet<Integer>(keys));
 
                     for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
                         assertNotNull("Null value received from cache [key=" + entry.getKey()
+ "]", entry.getValue());
@@ -183,9 +183,9 @@ public abstract class IgniteTxConsistencyRestartAbstractSelfTest extends
GridCom
             for (int i = 0; i < GRID_CNT; i++) {
                 IgniteEx grid = grid(i);
 
-                GridCache<Integer, Integer> cache = grid.cache(null);
+                IgniteCache<Integer, Integer> cache = grid.jcache(null);
 
-                if (cache.affinity().isPrimaryOrBackup(grid.localNode(), k)) {
+                if (grid.affinity(null).isPrimaryOrBackup(grid.localNode(), k)) {
                     if (val == null) {
                         val = cache.peek(k);
 
@@ -193,7 +193,7 @@ public abstract class IgniteTxConsistencyRestartAbstractSelfTest extends
GridCom
                     }
                     else
                         assertEquals("Failed to find value in cache [primary=" +
-                            cache.affinity().isPrimary(grid.localNode(), k) + ']',
+                            grid.affinity(null).isPrimary(grid.localNode(), k) + ']',
                             val, cache.peek(k));
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
index 7c860e1..45a18d5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
@@ -121,7 +121,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends
Gri
         final String initVal = "initialValue";
 
         for (Integer key : keys) {
-            grid(originatingNode()).cache(null).put(key, initVal);
+            grid(originatingNode()).jcache(null).put(key, initVal);
 
             map.put(key, String.valueOf(key));
         }
@@ -152,11 +152,11 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest
extends Gri
 
         GridTestUtils.runAsync(new Callable<Object>() {
             @Override public Object call() throws Exception {
-                GridCache<Integer, String> cache = txIgniteNode.cache(null);
+                IgniteCache<Integer, String> cache = txIgniteNode.jcache(null);
 
                 assertNotNull(cache);
 
-                IgniteTxProxyImpl tx = (IgniteTxProxyImpl)cache.txStart();
+                IgniteTxProxyImpl tx = (IgniteTxProxyImpl)txIgniteNode.transactions().txStart();
 
                 IgniteInternalTx txEx = GridTestUtils.getFieldValue(tx, "tx");
 
@@ -212,7 +212,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends
Gri
                     private Ignite ignite;
 
                     @Override public Void call() throws Exception {
-                        GridCache<Integer, String> cache = ignite.cache(null);
+                        IgniteCache<Integer, String> cache = ignite.jcache(null);
 
                         assertNotNull(cache);
 
@@ -229,7 +229,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends
Gri
                 UUID locNodeId = g.cluster().localNode().id();
 
                 assertEquals("Check failed for node: " + locNodeId, partial ? initVal : e.getValue(),
-                    g.cache(null).get(e.getKey()));
+                    g.jcache(null).get(e.getKey()));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
index e4bda25..08eda48 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
@@ -142,7 +142,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
         final String initVal = "initialValue";
 
         for (Integer key : keys) {
-            grid(originatingNode()).cache(null).put(key, initVal);
+            grid(originatingNode()).jcache(null).put(key, initVal);
 
             map.put(key, String.valueOf(key));
         }
@@ -175,11 +175,11 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
 
         GridTestUtils.runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                GridCache<Integer, String> cache = originatingNodeGrid.cache(null);
+                IgniteCache<Integer, String> cache = originatingNodeGrid.jcache(null);
 
                 assertNotNull(cache);
 
-                IgniteTx tx = cache.txStart();
+                IgniteTx tx = originatingNodeGrid.transactions().txStart();
 
                 try {
                     cache.putAll(map);
@@ -251,7 +251,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
                     private Ignite ignite;
 
                     @Override public Void call() throws Exception {
-                        GridCache<Integer, String> cache = ignite.cache(null);
+                        IgniteCache<Integer, String> cache = ignite.jcache(null);
 
                         assertNotNull(cache);
 
@@ -266,7 +266,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
 
         for (Map.Entry<Integer, String> e : map.entrySet()) {
             for (Ignite g : G.allGrids())
-                assertEquals(fullFailure ? initVal : e.getValue(), g.cache(null).get(e.getKey()));
+                assertEquals(fullFailure ? initVal : e.getValue(), g.jcache(null).get(e.getKey()));
         }
     }
 
@@ -277,7 +277,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
      * @throws Exception If failed.
      */
     private void checkPrimaryNodeCrash(final boolean commmit) throws Exception {
-        Collection<Integer> keys = new ArrayList<>(20);
+        Set<Integer> keys = new HashSet<>();
 
         for (int i = 0; i < 20; i++)
             keys.add(i);
@@ -298,21 +298,21 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
         final String initVal = "initialValue";
 
         for (Integer key : keys) {
-            grid(originatingNode()).cache(null).put(key, initVal);
+            grid(originatingNode()).jcache(null).put(key, initVal);
 
             map.put(key, String.valueOf(key));
         }
 
         Map<Integer, Collection<ClusterNode>> nodeMap = new HashMap<>();
 
-        GridCache<Integer, String> cache = grid(0).cache(null);
+        IgniteCache<Integer, String> cache = grid(0).jcache(null);
 
         info("Failing node ID: " + grid(1).localNode().id());
 
         for (Integer key : keys) {
             Collection<ClusterNode> nodes = new ArrayList<>();
 
-            nodes.addAll(cache.affinity().mapKeyToPrimaryAndBackups(key));
+            nodes.addAll(affinity(cache).mapKeyToPrimaryAndBackups(key));
 
             nodes.remove(primaryNode);
 
@@ -324,7 +324,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
 
         assertNotNull(cache);
 
-        try (IgniteTx tx = cache.txStart()) {
+        try (IgniteTx tx = grid(0).transactions().txStart()) {
             cache.getAll(keys);
 
             // Should not send any messages.
@@ -382,7 +382,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
                     private Ignite ignite;
 
                     @Override public Void call() throws Exception {
-                        GridCache<Integer, String> cache = ignite.cache(null);
+                        IgniteCache<Integer, String> cache = ignite.jcache(null);
 
                         assertNotNull(cache);
 
@@ -397,7 +397,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
 
         for (Map.Entry<Integer, String> e : map.entrySet()) {
             for (Ignite g : G.allGrids())
-                assertEquals(!commmit ? initVal : e.getValue(), g.cache(null).get(e.getKey()));
+                assertEquals(!commmit ? initVal : e.getValue(), g.jcache(null).get(e.getKey()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5a5471f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java
index b59b5df..bda9844 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java
@@ -70,6 +70,14 @@ public class IgniteTxTimeoutAbstractTest extends GridCommonAbstractTest
{
     }
 
     /**
+     * @param i Grid index.
+     * @return Cache.
+     */
+    @Override protected <K, V> IgniteCache<K, V> jcache(int i) {
+        return IGNITEs.get(i).jcache(null);
+    }
+
+    /**
      * @throws IgniteCheckedException If test failed.
      */
     public void testPessimisticReadCommitted() throws Exception {


Mime
View raw message