ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [51/51] [abbrv] incubator-ignite git commit: ignite-96 wip (core compilable)
Date Sat, 07 Feb 2015 10:53:23 GMT
ignite-96 wip (core compilable)


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

Branch: refs/heads/ignite-96
Commit: 08db7f3c5c28142bcf3bf2462a9b44b931b2733c
Parents: 6d2ed75
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Sat Feb 7 13:52:15 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Sat Feb 7 13:52:15 2015 +0300

----------------------------------------------------------------------
 .../GridCacheVersionConflictContext.java        |   1 -
 .../service/GridServiceProcessor.java           |  11 +-
 .../cache/GridCacheAffinityApiSelfTest.java     |  12 +-
 .../cache/GridCacheConcurrentMapTest.java       |   5 +-
 ...idCacheConfigurationConsistencySelfTest.java |   4 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java | 278 ++++----
 .../cache/GridCacheObjectToStringSelfTest.java  |   3 +-
 .../cache/GridCacheOffHeapSelfTest.java         |  12 +-
 .../cache/GridCachePartitionedGetSelfTest.java  |  16 +-
 .../GridCacheAbstractPrimarySyncSelfTest.java   |   2 +-
 .../GridCacheEntrySetAbstractSelfTest.java      |   5 +-
 ...dCacheMultithreadedFailoverAbstractTest.java |   8 +-
 .../near/GridCacheGetStoreErrorSelfTest.java    |   4 +-
 .../GridCacheNearReaderPreloadSelfTest.java     |   5 +-
 .../near/GridCacheNearReadersSelfTest.java      |   4 +-
 .../GridCacheReplicatedEvictionSelfTest.java    |   2 +-
 .../GridCacheReplicatedPreloadSelfTest.java     |  12 +-
 .../GridCacheEvictionTouchSelfTest.java         |   3 +-
 .../GridCacheFifoEvictionPolicySelfTest.java    | 644 +++++++++----------
 .../lru/GridCacheLruEvictionPolicySelfTest.java | 567 ++++++++--------
 .../GridCacheRandomEvictionPolicySelfTest.java  | 111 ++--
 .../GridCacheSwapScanQueryAbstractSelfTest.java |  21 +-
 .../fs/GridGgfsProcessorSelfTest.java           |   3 +-
 23 files changed, 874 insertions(+), 859 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
index 79f1bf0..1b5ef5a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.version;
 
-import org.apache.ignite.cache.*;
 import org.jetbrains.annotations.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 8a619df..8673b48 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -41,6 +41,7 @@ import org.apache.ignite.thread.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 
@@ -360,7 +361,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                                 "different configuration) [deployed=" + dep.configuration() + ", new=" + cfg + ']'));
                         }
                         else {
-                            for (Entry<Object, Object> e : cache.entrySetx()) {
+                            for (Cache.Entry<Object, Object> e : cache.entrySetx()) {
                                 if (e.getKey() instanceof GridServiceAssignmentsKey) {
                                     GridServiceAssignments assigns = (GridServiceAssignments)e.getValue();
 
@@ -452,7 +453,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
     public IgniteInternalFuture<?> cancelAll() {
         Collection<IgniteInternalFuture<?>> futs = new ArrayList<>();
 
-        for (Entry<Object, Object> e : cache.entrySetx()) {
+        for (Cache.Entry<Object, Object> e : cache.entrySetx()) {
             if (!(e.getKey() instanceof GridServiceDeploymentKey))
                 continue;
 
@@ -471,7 +472,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
     public Collection<ServiceDescriptor> serviceDescriptors() {
         Collection<ServiceDescriptor> descs = new ArrayList<>();
 
-        for (Entry<Object, Object> e : cache.entrySetx()) {
+        for (Cache.Entry<Object, Object> e : cache.entrySetx()) {
             if (!(e.getKey() instanceof GridServiceDeploymentKey))
                 continue;
 
@@ -1072,7 +1073,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                                 ctx.cache().context().deploy().ignoreOwnership(true);
 
                             try {
-                                for (Entry<Object, Object> e : cache.entrySetx()) {
+                                for (Cache.Entry<Object, Object> e : cache.entrySetx()) {
                                     if (!(e.getKey() instanceof GridServiceDeploymentKey))
                                         continue;
 
@@ -1105,7 +1106,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                         }
 
                         // Clean up zombie assignments.
-                        for (Entry<Object, Object> e : cache.primaryEntrySetx()) {
+                        for (Cache.Entry<Object, Object> e : cache.primaryEntrySetx()) {
                             if (!(e.getKey() instanceof GridServiceAssignmentsKey))
                                 continue;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
index c563721..0ee6c00 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
@@ -325,16 +324,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest {
 
         int expPart = affinity().partition(affinityMapper().affinityKey(key));
 
-        for (int i = 0; i < gridCount(); i++) {
+        for (int i = 0; i < gridCount(); i++)
             assertEquals(expPart, grid(i).cache(null).affinity().partition(key));
-            assertEquals(expPart, grid(i).cache(null).entry(key).partition());
-        }
-
-        assertTrue(grid(0).cache(null).putx(key, 1));
-
-        for (int i = 0; i < gridCount(); i++) {
-            assertEquals(expPart, grid(i).cache(null).affinity().partition(key));
-            assertEquals(expPart, grid(i).cache(null).entry(key).partition());
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
index 29f6578..7aa81bb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
@@ -23,6 +23,7 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -76,7 +77,7 @@ public class GridCacheConcurrentMapTest extends GridCommonAbstractTest {
             cache.put("key" + i, "val" + i);
 
         for (int i = 0; i < 20; i++) {
-            Entry<String, String> entry = cache.randomEntry();
+            Cache.Entry<String, String> entry = cache.randomEntry();
 
             assert entry != null;
 
@@ -116,7 +117,7 @@ public class GridCacheConcurrentMapTest extends GridCommonAbstractTest {
             new Callable<Object>() {
                 @Nullable @Override public Object call() throws Exception {
                     while (!done.get()) {
-                        Entry<String, String> entry = cache.randomEntry();
+                        Cache.Entry<String, String> entry = cache.randomEntry();
 
                         info("Random entry key: " + (entry != null ? entry.getKey() : "N/A"));
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
index 16ecfca..916681c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
@@ -397,7 +397,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionFilter(new CacheEvictionFilter<Object, Object>() {
-                        @Override public boolean evictAllowed(Entry<Object, Object> entry) {
+                        @Override public boolean evictAllowed(Cache.Entry<Object, Object> entry) {
                             return false;
                         }
                     });
@@ -408,7 +408,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionFilter(new CacheEvictionFilter<Object, Object>() {
-                        @Override public boolean evictAllowed(Entry<Object, Object> entry) {
+                        @Override public boolean evictAllowed(Cache.Entry<Object, Object> entry) {
                             return true;
                         }
                     });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
index 0c0e2ba..8dda1c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
@@ -32,7 +32,6 @@ import org.apache.ignite.testframework.junits.common.*;
 
 import javax.cache.Cache.*;
 import java.io.*;
-import java.lang.reflect.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
@@ -40,7 +39,7 @@ import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
- * Tests from {@link org.apache.ignite.cache.Entry#memorySize()} method.
+ *
  */
 public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
     /** IP finder. */
@@ -127,141 +126,148 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
 
     /** @throws Exception If failed. */
     public void testLocal() throws Exception {
-        mode = LOCAL;
-
-        try {
-            GridCache<Integer, Value> cache = startGrid().cache(null);
-
-            assertTrue(cache.putx(1, new Value(new byte[1024])));
-            assertTrue(cache.putx(2, new Value(new byte[2048])));
-
-            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + extrasSize(cache.entry(0)),
-                cache.entry(0).memorySize());
-            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + extrasSize(cache.entry(1)),
-                cache.entry(1).memorySize());
-            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + extrasSize(cache.entry(2)),
-                cache.entry(2).memorySize());
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+//        mode = LOCAL;
+//
+//        try {
+//            GridCache<Integer, Value> cache = startGrid().cache(null);
+//
+//            assertTrue(cache.putx(1, new Value(new byte[1024])));
+//            assertTrue(cache.putx(2, new Value(new byte[2048])));
+//
+//            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + extrasSize(cache.entry(0)),
+//                cache.entry(0).memorySize());
+//            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + extrasSize(cache.entry(1)),
+//                cache.entry(1).memorySize());
+//            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + extrasSize(cache.entry(2)),
+//                cache.entry(2).memorySize());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
     /** @throws Exception If failed. */
     public void testReplicated() throws Exception {
-        mode = REPLICATED;
-
-        try {
-            GridCache<Integer, Value> cache = startGrid().cache(null);
-
-            assertTrue(cache.putx(1, new Value(new byte[1024])));
-            assertTrue(cache.putx(2, new Value(new byte[2048])));
-
-            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + REPLICATED_ENTRY_OVERHEAD +
-                extrasSize(cache.entry(0)), cache.entry(0).memorySize());
-            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + REPLICATED_ENTRY_OVERHEAD +
-                extrasSize(cache.entry(1)), cache.entry(1).memorySize());
-            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + REPLICATED_ENTRY_OVERHEAD +
-                extrasSize(cache.entry(2)), cache.entry(2).memorySize());
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+
+//        mode = REPLICATED;
+//
+//        try {
+//            GridCache<Integer, Value> cache = startGrid().cache(null);
+//
+//            assertTrue(cache.putx(1, new Value(new byte[1024])));
+//            assertTrue(cache.putx(2, new Value(new byte[2048])));
+//
+//            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + REPLICATED_ENTRY_OVERHEAD +
+//                extrasSize(cache.entry(0)), cache.entry(0).memorySize());
+//            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + REPLICATED_ENTRY_OVERHEAD +
+//                extrasSize(cache.entry(1)), cache.entry(1).memorySize());
+//            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + REPLICATED_ENTRY_OVERHEAD +
+//                extrasSize(cache.entry(2)), cache.entry(2).memorySize());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
     /** @throws Exception If failed. */
     public void testPartitionedNearEnabled() throws Exception {
-        mode = PARTITIONED;
-        nearEnabled = true;
-
-        try {
-            startGridsMultiThreaded(2);
-
-            int[] keys = new int[3];
-
-            int key = 0;
-
-            for (int i = 0; i < keys.length; i++) {
-                while (true) {
-                    key++;
-
-                    if (grid(0).mapKeyToNode(null, key).equals(grid(0).localNode())) {
-                        if (i > 0)
-                            assertTrue(cache(0).putx(key, new Value(new byte[i * 1024])));
-
-                        keys[i] = key;
-
-                        break;
-                    }
-                }
-            }
-
-            // Create near entries.
-            assertNotNull(cache(1).get(keys[1]));
-            assertNotNull(cache(1).get(keys[2]));
-
-            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
-                extrasSize(cache(0).entry(keys[0])), cache(0).entry(keys[0]).memorySize());
-            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD + READER_SIZE +
-                extrasSize(cache(0).entry(keys[1])), cache(0).entry(keys[1]).memorySize());
-            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD + READER_SIZE +
-                extrasSize(cache(0).entry(keys[2])), cache(0).entry(keys[2]).memorySize());
-
-            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + NEAR_ENTRY_OVERHEAD +
-                extrasSize(cache(1).entry(keys[0])), cache(1).entry(keys[0]).memorySize());
-            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + NEAR_ENTRY_OVERHEAD +
-                extrasSize(cache(1).entry(keys[1])), cache(1).entry(keys[1]).memorySize());
-            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + NEAR_ENTRY_OVERHEAD +
-                extrasSize(cache(1).entry(keys[2])), cache(1).entry(keys[2]).memorySize());
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+
+//        mode = PARTITIONED;
+//        nearEnabled = true;
+//
+//        try {
+//            startGridsMultiThreaded(2);
+//
+//            int[] keys = new int[3];
+//
+//            int key = 0;
+//
+//            for (int i = 0; i < keys.length; i++) {
+//                while (true) {
+//                    key++;
+//
+//                    if (grid(0).mapKeyToNode(null, key).equals(grid(0).localNode())) {
+//                        if (i > 0)
+//                            assertTrue(cache(0).putx(key, new Value(new byte[i * 1024])));
+//
+//                        keys[i] = key;
+//
+//                        break;
+//                    }
+//                }
+//            }
+//
+//            // Create near entries.
+//            assertNotNull(cache(1).get(keys[1]));
+//            assertNotNull(cache(1).get(keys[2]));
+//
+//            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
+//                extrasSize(cache(0).entry(keys[0])), cache(0).entry(keys[0]).memorySize());
+//            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD + READER_SIZE +
+//                extrasSize(cache(0).entry(keys[1])), cache(0).entry(keys[1]).memorySize());
+//            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD + READER_SIZE +
+//                extrasSize(cache(0).entry(keys[2])), cache(0).entry(keys[2]).memorySize());
+//
+//            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + NEAR_ENTRY_OVERHEAD +
+//                extrasSize(cache(1).entry(keys[0])), cache(1).entry(keys[0]).memorySize());
+//            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + NEAR_ENTRY_OVERHEAD +
+//                extrasSize(cache(1).entry(keys[1])), cache(1).entry(keys[1]).memorySize());
+//            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + NEAR_ENTRY_OVERHEAD +
+//                extrasSize(cache(1).entry(keys[2])), cache(1).entry(keys[2]).memorySize());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
     /** @throws Exception If failed. */
     public void testPartitionedNearDisabled() throws Exception {
-        mode = PARTITIONED;
-        nearEnabled = false;
-
-        try {
-            startGridsMultiThreaded(2);
-
-            int[] keys = new int[3];
-
-            int key = 0;
-
-            for (int i = 0; i < keys.length; i++) {
-                while (true) {
-                    key++;
-
-                    if (grid(0).mapKeyToNode(null, key).equals(grid(0).localNode())) {
-                        if (i > 0)
-                            assertTrue(cache(0).putx(key, new Value(new byte[i * 1024])));
-
-                        keys[i] = key;
-
-                        break;
-                    }
-                }
-            }
-
-            // Create near entries.
-            assertNotNull(cache(1).get(keys[1]));
-            assertNotNull(cache(1).get(keys[2]));
-
-            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
-                extrasSize(cache(0).entry(keys[0])), cache(0).entry(keys[0]).memorySize());
-            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
-                extrasSize(cache(0).entry(keys[1])), cache(0).entry(keys[1]).memorySize());
-            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
-                extrasSize(cache(0).entry(keys[2])), cache(0).entry(keys[2]).memorySize());
-
-            // Do not test other node since there are no backups.
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+
+//        mode = PARTITIONED;
+//        nearEnabled = false;
+//
+//        try {
+//            startGridsMultiThreaded(2);
+//
+//            int[] keys = new int[3];
+//
+//            int key = 0;
+//
+//            for (int i = 0; i < keys.length; i++) {
+//                while (true) {
+//                    key++;
+//
+//                    if (grid(0).mapKeyToNode(null, key).equals(grid(0).localNode())) {
+//                        if (i > 0)
+//                            assertTrue(cache(0).putx(key, new Value(new byte[i * 1024])));
+//
+//                        keys[i] = key;
+//
+//                        break;
+//                    }
+//                }
+//            }
+//
+//            // Create near entries.
+//            assertNotNull(cache(1).get(keys[1]));
+//            assertNotNull(cache(1).get(keys[2]));
+//
+//            assertEquals(KEY_SIZE + NULL_REF_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
+//                extrasSize(cache(0).entry(keys[0])), cache(0).entry(keys[0]).memorySize());
+//            assertEquals(KEY_SIZE + ONE_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
+//                extrasSize(cache(0).entry(keys[1])), cache(0).entry(keys[1]).memorySize());
+//            assertEquals(KEY_SIZE + TWO_KB_VAL_SIZE + ENTRY_OVERHEAD + DHT_ENTRY_OVERHEAD +
+//                extrasSize(cache(0).entry(keys[2])), cache(0).entry(keys[2]).memorySize());
+//
+//            // Do not test other node since there are no backups.
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
     /**
@@ -272,15 +278,19 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private int extrasSize(Entry entry) throws Exception {
-        Method mthd = GridCacheMapEntry.class.getDeclaredMethod("extrasSize");
-
-        mthd.setAccessible(true);
-
-        GridCacheContext ctx = U.field(entry, "ctx");
-
-        GridCacheEntryEx entry0 = ((GridCacheEntryImpl)entry).entryEx(false, ctx.discovery().topologyVersion());
-
-        return (Integer)mthd.invoke(entry0);
+        assert false : "ignite-96";
+
+        return -1;
+
+//        Method mthd = GridCacheMapEntry.class.getDeclaredMethod("extrasSize");
+//
+//        mthd.setAccessible(true);
+//
+//        GridCacheContext ctx = U.field(entry, "ctx");
+//
+//        GridCacheEntryEx entry0 = ((GridCacheEntryImpl)entry).entryEx(false, ctx.discovery().topologyVersion());
+//
+//        return (Integer)mthd.invoke(entry0);
     }
 
     /** Value. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
index adcd7d8..8a37a30 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.apache.ignite.transactions.*;
 
+import javax.cache.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
@@ -166,7 +167,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
                     assertFalse("Entry is locked after implicit transaction commit: " + entry, entry.lockedByAny());
             }
 
-            Set<Entry<Object, Object>> entries = cache.entrySet();
+            Set<Cache.Entry<Object, Object>> entries = cache.entrySet();
 
             assertNotNull(entries);
             assertFalse(entries.toString().isEmpty());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index aa4416d..eb79901 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.file.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -342,11 +343,13 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
             assert val != null;
             assert val.value() == i;
 
-            Entry<Integer, CacheValue> entry = cache.entry(i);
+            Cache.Entry<Integer, CacheValue> entry = cache.entry(i);
 
             assert entry != null;
 
-            versions.put(i, entry.version());
+            assert false : "ignite-96";
+
+//            versions.put(i, entry.version());
         }
 
         assert swapCnt.get() == 0;
@@ -564,7 +567,7 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
     private void checkEntries(CacheProjection<Integer, CacheValue> cache,
         int lowerBound, int upperBound) throws Exception {
         for (int i = lowerBound; i < upperBound; i++) {
-            Entry<Integer, CacheValue> entry = cache.entry(i);
+            Cache.Entry<Integer, CacheValue> entry = cache.entry(i);
 
             assert entry != null;
             assert entry.getKey() != null;
@@ -573,7 +576,8 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
 
             assertNotNull("Value null for key: " + i, val);
             assertEquals(entry.getKey(), (Integer)val.value());
-            assertEquals(entry.version(), versions.get(i));
+            assert false : "ignite-96";
+            //assertEquals(entry.version(), versions.get(i));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
index dd5ed6d..cca77b2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
@@ -119,9 +119,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
         for (int i = 0; i < GRID_CNT; i++) {
             GridCache<String, Integer> c = grid(i).cache(null);
 
-            Entry<String, Integer> e = c.entry(KEY);
-
-            if (e.primary()) {
+            if (grid(i).affinity(null).isPrimary(grid(i).localNode(), KEY)) {
                 info("Primary node: " + grid(i).localNode().id());
 
                 c.get(KEY);
@@ -140,9 +138,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
         for (int i = 0; i < GRID_CNT; i++) {
             GridCache<String, Integer> c = grid(i).cache(null);
 
-            Entry<String, Integer> e = c.entry(KEY);
-
-            if (e.backup()) {
+            if (grid(i).affinity(null).isBackup(grid(i).localNode(), KEY)) {
                 info("Backup node: " + grid(i).localNode().id());
 
                 Integer val = c.get(KEY);
@@ -173,9 +169,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
         for (int i = 0; i < GRID_CNT; i++) {
             GridCache<String, Integer> c = grid(i).cache(null);
 
-            Entry<String, Integer> e = c.entry(KEY);
-
-            if (!e.primary() && !e.backup()) {
+            if (!grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), KEY)) {
                 info("Near node: " + grid(i).localNode().id());
 
                 Integer val = c.get(KEY);
@@ -221,9 +215,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
         for (int i = 0; i < GRID_CNT; i++) {
             Ignite g = grid(i);
 
-            Entry<String, Integer> e = g.<String, Integer>cache(null).entry(KEY);
-
-            if (e.primary()) {
+            if (grid(i).affinity(null).isPrimary(grid(i).localNode(), KEY)) {
                 info("Primary node: " + g.cluster().localNode().id());
 
                 // Put value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
index 4149d98..6d82740 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java
@@ -91,7 +91,7 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs
             for (int j = 0; j < GRID_CNT; j++) {
                 GridCache<Integer, Integer> cache = grid(j).cache(null);
 
-                if (cache.entry(i).primary()) {
+                if (grid(j).affinity(null).isPrimary(grid(j).localNode(), i)) {
                     try (IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         cache.put(i, i);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
index e6a5eab..ecc83dd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.transactions.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -98,9 +99,9 @@ public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstrac
 
             int cntr = 0;
 
-            Set<Entry<Object, Object>> entries = cache.entrySet();
+            Set<Cache.Entry<Object, Object>> entries = cache.entrySet();
 
-            for (Entry e : entries) {
+            for (Cache.Entry e : entries) {
                 if (e.getKey() instanceof Integer)
                     cntr++;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/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 d0d7e79..556e9c9 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
@@ -33,6 +33,7 @@ import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.apache.ignite.transactions.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -587,13 +588,12 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
 
             for (Integer key : failedKeys) {
                 for (int i = 0; i < dataNodes(); i++) {
-                    Entry<Integer, Integer> Entry = caches.get(i).entry(key);
+                    Cache.Entry<Integer, Integer> e = caches.get(i).entry(key);
 
                     UUID nodeId = G.ignite(nodeName(i)).cluster().localNode().id();
 
-                    if (!F.eq(Entry.get(), expVals.get(key)))
-                        log.error("key=" + key + ", expVal=" + expVals.get(key) + ", cacheVal=" + Entry.get() +
-                            ", primary=" + Entry.primary() + ", backup=" + Entry.backup() +
+                    if (!F.eq(e.getValue(), expVals.get(key)))
+                        log.error("key=" + key + ", expVal=" + expVals.get(key) + ", cacheVal=" + e.getValue() +
                             ", nodeId=" + nodeId);
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
index e6e1478..1152799 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
@@ -140,9 +140,7 @@ public class GridCacheGetStoreErrorSelfTest extends GridCommonAbstractTest {
         for (int i = 0; i < 1000; i++) {
             key = String.valueOf(i);
 
-            Entry<Object, Object> entry = grid(0).cache(null).entry(key);
-
-            if (!entry.primary() && entry.backup())
+            if (!grid(0).affinity(null).isPrimaryOrBackup(grid(0).localNode(), key))
                 break;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java
index 93413f7..94344c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
@@ -191,9 +192,9 @@ public class GridCacheNearReaderPreloadSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void checkCache(CacheProjection<Integer, Integer> cache, int key, int expVal) throws Exception {
-        Entry<Integer, Integer> entry = cache.entry(key);
+        Cache.Entry<Integer, Integer> entry = cache.entry(key);
 
         assert F.eq(expVal, entry.getValue()) : "Unexpected cache value [key=" + key + ", expected=" + expVal +
-            ", actual=" + entry.getValue() + ", primary=" + entry.primary() + ", backup=" + entry.backup() + ']';
+            ", actual=" + entry.getValue() + ']';
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
index 8b2a651..d13fcd9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
@@ -404,12 +404,12 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest {
         assert e2 != null;
 
         // Check entry on primary node.
-        assertTrue(e1.wrap(false).primary());
+        assertTrue(grid(primary.id()).affinity(null).isPrimary(primary, e1.key()));
         assertNotNull(e1.readers());
         assertTrue(e1.readers().isEmpty());
 
         // Check entry on backup node.
-        assertFalse(e2.wrap(false).primary());
+        assertFalse(grid(backup.id()).affinity(null).isBackup(backup, e2.key()));
         assertNotNull(e2.readers());
         assertTrue(e2.readers().isEmpty());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
index f94602f..1bff158 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
@@ -86,7 +86,7 @@ public class GridCacheReplicatedEvictionSelfTest extends GridCacheAbstractSelfTe
 
         for (int g = 0; g < gridCount(); g++) {
             for (int i = 0; i < KEYS; i++) {
-                if (cache(g).entry(String.valueOf(i)).primary())
+                if (grid(i).affinity(null).isPrimary(grid(i).localNode(), String.valueOf(i)))
                     assertTrue(cache(g).evict(String.valueOf(i)));
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
index 4101493..529ef85 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.spi.eventstorage.memory.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.io.*;
 import java.util.*;
 
@@ -158,7 +159,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
             cache1.put(1, "val1");
             cache1.put(2, "val2");
 
-            Entry<Integer, String> e1 = cache1.entry(1);
+            Cache.Entry<Integer, String> e1 = cache1.entry(1);
 
             assert e1 != null;
 
@@ -191,13 +192,16 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
             assertEquals("val1", cache2.peek(1));
             assertEquals("val2", cache2.peek(2));
 
-            Entry<Integer, String> e2 = cache2.entry(1);
+            Cache.Entry<Integer, String> e2 = cache2.entry(1);
 
             assert e2 != null;
             assert e2 != e1;
-            assert e2.version() != null;
 
-            assertEquals(e1.version(), e2.version());
+            assert false : "ignite-96";
+
+//            assert e2.version() != null;
+//
+//            assertEquals(e1.version(), e2.version());
         }
         finally {
             stopAllGrids();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/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 8121c3f..6e0b7a6 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
@@ -32,6 +32,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.apache.ignite.transactions.*;
 
+import javax.cache.*;
 import javax.cache.configuration.*;
 import java.util.*;
 
@@ -141,7 +142,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
                 CacheFifoEvictionPolicy<Integer, Integer> plc0 = (CacheFifoEvictionPolicy<Integer, Integer>) plc;
 
                 if (!plc0.queue().isEmpty()) {
-                    for (Entry<Integer, Integer> e : plc0.queue())
+                    for (Cache.Entry<Integer, Integer> e : plc0.queue())
                         U.warn(log, "Policy queue item: " + e);
 
                     fail("Test failed, see logs for details.");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/GridCacheFifoEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/GridCacheFifoEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/GridCacheFifoEvictionPolicySelfTest.java
index 8cf4d08..9931663 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/GridCacheFifoEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/GridCacheFifoEvictionPolicySelfTest.java
@@ -17,16 +17,10 @@
 
 package org.apache.ignite.internal.processors.cache.eviction.fifo;
 
-import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.eviction.*;
 import org.apache.ignite.cache.eviction.fifo.*;
 import org.apache.ignite.internal.processors.cache.eviction.*;
 
-import javax.cache.Cache.*;
-import java.util.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
 /**
  * FIFO Eviction test.
  */
@@ -37,324 +31,326 @@ public class GridCacheFifoEvictionPolicySelfTest extends
      * @throws Exception If failed.
      */
     public void testPolicy() throws Exception {
-        try {
-            startGrid();
-
-            MockEntry e1 = new MockEntry("1", "1");
-            MockEntry e2 = new MockEntry("2", "2");
-            MockEntry e3 = new MockEntry("3", "3");
-            MockEntry e4 = new MockEntry("4", "4");
-            MockEntry e5 = new MockEntry("5", "5");
-
-            CacheFifoEvictionPolicy<String, String> p = policy();
-
-            p.setMaxSize(3);
-
-            p.onEntryAccessed(false, e1);
-
-            check(p.queue(), e1);
-
-            p.onEntryAccessed(false, e2);
-
-            check(p.queue(), e1, e2);
-
-            p.onEntryAccessed(false, e3);
-
-            check(p.queue(), e1, e2, e3);
-
-            assert !e1.isEvicted();
-            assert !e2.isEvicted();
-            assert !e3.isEvicted();
-
-            assertEquals(3, p.getCurrentSize());
-
-            p.onEntryAccessed(false, e4);
-
-            check(p.queue(), e2, e3, e4);
-
-            assertEquals(3, p.getCurrentSize());
-
-            assert e1.isEvicted();
-            assert !e2.isEvicted();
-            assert !e3.isEvicted();
-            assert !e4.isEvicted();
-
-            p.onEntryAccessed(false, e5);
-
-            check(p.queue(), e3, e4, e5);
-
-            assertEquals(3, p.getCurrentSize());
-
-            assert e2.isEvicted();
-            assert !e3.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e1 = new MockEntry("1", "1"));
-
-            check(p.queue(), e4, e5, e1);
-
-            assertEquals(3, p.getCurrentSize());
-
-            assert e3.isEvicted();
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e5);
-
-            check(p.queue(), e4, e5, e1);
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e1);
-
-            assertEquals(3, p.getCurrentSize());
-
-            check(p.queue(), e4, e5, e1);
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e5);
-
-            assertEquals(3, p.getCurrentSize());
-
-            check(p.queue(), e4, e5, e1);
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(true, e1);
-
-            assertEquals(2, p.getCurrentSize());
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(true, e4);
-
-            assertEquals(1, p.getCurrentSize());
-
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(true, e5);
-
-            assertEquals(0, p.getCurrentSize());
-
-            assert !e5.isEvicted();
-
-            info(p);
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+
+//        try {
+//            startGrid();
+//
+//            MockEntry e1 = new MockEntry("1", "1");
+//            MockEntry e2 = new MockEntry("2", "2");
+//            MockEntry e3 = new MockEntry("3", "3");
+//            MockEntry e4 = new MockEntry("4", "4");
+//            MockEntry e5 = new MockEntry("5", "5");
+//
+//            CacheFifoEvictionPolicy<String, String> p = policy();
+//
+//            p.setMaxSize(3);
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            check(p.queue(), e1);
+//
+//            p.onEntryAccessed(false, e2);
+//
+//            check(p.queue(), e1, e2);
+//
+//            p.onEntryAccessed(false, e3);
+//
+//            check(p.queue(), e1, e2, e3);
+//
+//            assert !e1.isEvicted();
+//            assert !e2.isEvicted();
+//            assert !e3.isEvicted();
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            p.onEntryAccessed(false, e4);
+//
+//            check(p.queue(), e2, e3, e4);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            assert e1.isEvicted();
+//            assert !e2.isEvicted();
+//            assert !e3.isEvicted();
+//            assert !e4.isEvicted();
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            check(p.queue(), e3, e4, e5);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            assert e2.isEvicted();
+//            assert !e3.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e1 = new MockEntry("1", "1"));
+//
+//            check(p.queue(), e4, e5, e1);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            assert e3.isEvicted();
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            check(p.queue(), e4, e5, e1);
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            check(p.queue(), e4, e5, e1);
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            check(p.queue(), e4, e5, e1);
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(true, e1);
+//
+//            assertEquals(2, p.getCurrentSize());
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(true, e4);
+//
+//            assertEquals(1, p.getCurrentSize());
+//
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(true, e5);
+//
+//            assertEquals(0, p.getCurrentSize());
+//
+//            assert !e5.isEvicted();
+//
+//            info(p);
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMemory() throws Exception {
-        try {
-            startGrid();
-
-            CacheFifoEvictionPolicy<String, String> p = policy();
-
-            int max = 10;
-
-            p.setMaxSize(max);
-
-            int cnt = 11;
-
-            for (int i = 0; i < cnt; i++)
-                p.onEntryAccessed(false, new MockEntry(Integer.toString(i), Integer.toString(i)));
-
-            info(p);
-
-            assertEquals(max, p.getCurrentSize());
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRandom() throws Exception {
-        try {
-            startGrid();
-
-            CacheFifoEvictionPolicy<String, String> p = policy();
-
-            int max = 10;
-
-            p.setMaxSize(max);
-
-            Random rand = new Random();
-
-            int keys = 31;
-
-            MockEntry[] fifos = new MockEntry[keys];
-
-            for (int i = 0; i < fifos.length; i++)
-                fifos[i] = new MockEntry(Integer.toString(i));
-
-            int runs = 5000000;
-
-            for (int i = 0; i < runs; i++) {
-                boolean rmv = rand.nextBoolean();
-
-                int j = rand.nextInt(fifos.length);
-
-                MockEntry e = entry(fifos, j);
-
-                if (rmv)
-                    fifos[j] = new MockEntry(Integer.toString(j));
-
-                p.onEntryAccessed(rmv, e);
-            }
-
-            info(p);
-
-            int curSize = p.getCurrentSize();
-
-            assert curSize <= max : "curSize <= max [curSize=" + curSize + ", max=" + max + ']';
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAllowEmptyEntries() throws Exception {
-        try {
-            startGrid();
-
-            MockEntry e1 = new MockEntry("1");
-
-            e1.setValue("val");
-
-            MockEntry e2 = new MockEntry("2");
-
-            MockEntry e3 = new MockEntry("3");
-
-            e3.setValue("val");
-
-            MockEntry e4 = new MockEntry("4");
-
-            MockEntry e5 = new MockEntry("5");
-
-            e5.setValue("val");
-
-            CacheFifoEvictionPolicy<String, String> p = policy();
-
-            p.setMaxSize(10);
-
-            p.onEntryAccessed(false, e1);
-
-            assertFalse(e1.isEvicted());
-
-            p.onEntryAccessed(false, e2);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e2.isEvicted());
-
-            p.onEntryAccessed(false, e3);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-
-            p.onEntryAccessed(false, e4);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e4.isEvicted());
-
-            p.onEntryAccessed(false, e5);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e5.isEvicted());
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPut() throws Exception {
-        mode = LOCAL;
-        syncCommit = true;
-        plcMax = 100;
-
-        Ignite ignite = startGrid();
-
-        try {
-            GridCache<Integer, Integer> cache = ignite.cache(null);
-
-            int cnt = 500;
-
-            int min = Integer.MAX_VALUE;
-
-            int minIdx = 0;
-
-            for (int i = 0; i < cnt; i++) {
-                cache.put(i, i);
-
-                int cacheSize = cache.size();
-
-                if (i > plcMax && cacheSize < min) {
-                    min = cacheSize;
-                    minIdx = i;
-                }
-            }
-
-            assert min >= plcMax : "Min cache size is too small: " + min;
-
-            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;
-
-            minIdx = 0;
-
-            // Touch.
-            for (int i = cnt; --i > cnt - plcMax;) {
-                cache.get(i);
-
-                int cacheSize = cache.size();
-
-                if (cacheSize < min) {
-                    min = cacheSize;
-                    minIdx = i;
-                }
-            }
-
-            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;
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testMemory() throws Exception {
+//        try {
+//            startGrid();
+//
+//            CacheFifoEvictionPolicy<String, String> p = policy();
+//
+//            int max = 10;
+//
+//            p.setMaxSize(max);
+//
+//            int cnt = 11;
+//
+//            for (int i = 0; i < cnt; i++)
+//                p.onEntryAccessed(false, new MockEntry(Integer.toString(i), Integer.toString(i)));
+//
+//            info(p);
+//
+//            assertEquals(max, p.getCurrentSize());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testRandom() throws Exception {
+//        try {
+//            startGrid();
+//
+//            CacheFifoEvictionPolicy<String, String> p = policy();
+//
+//            int max = 10;
+//
+//            p.setMaxSize(max);
+//
+//            Random rand = new Random();
+//
+//            int keys = 31;
+//
+//            MockEntry[] fifos = new MockEntry[keys];
+//
+//            for (int i = 0; i < fifos.length; i++)
+//                fifos[i] = new MockEntry(Integer.toString(i));
+//
+//            int runs = 5000000;
+//
+//            for (int i = 0; i < runs; i++) {
+//                boolean rmv = rand.nextBoolean();
+//
+//                int j = rand.nextInt(fifos.length);
+//
+//                MockEntry e = entry(fifos, j);
+//
+//                if (rmv)
+//                    fifos[j] = new MockEntry(Integer.toString(j));
+//
+//                p.onEntryAccessed(rmv, e);
+//            }
+//
+//            info(p);
+//
+//            int curSize = p.getCurrentSize();
+//
+//            assert curSize <= max : "curSize <= max [curSize=" + curSize + ", max=" + max + ']';
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testAllowEmptyEntries() throws Exception {
+//        try {
+//            startGrid();
+//
+//            MockEntry e1 = new MockEntry("1");
+//
+//            e1.setValue("val");
+//
+//            MockEntry e2 = new MockEntry("2");
+//
+//            MockEntry e3 = new MockEntry("3");
+//
+//            e3.setValue("val");
+//
+//            MockEntry e4 = new MockEntry("4");
+//
+//            MockEntry e5 = new MockEntry("5");
+//
+//            e5.setValue("val");
+//
+//            CacheFifoEvictionPolicy<String, String> p = policy();
+//
+//            p.setMaxSize(10);
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            assertFalse(e1.isEvicted());
+//
+//            p.onEntryAccessed(false, e2);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e2.isEvicted());
+//
+//            p.onEntryAccessed(false, e3);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//
+//            p.onEntryAccessed(false, e4);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//            assertFalse(e4.isEvicted());
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//            assertFalse(e5.isEvicted());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
+//    }
+//
+//    /**
+//     * @throws Exception If failed.
+//     */
+//    public void testPut() throws Exception {
+//        mode = LOCAL;
+//        syncCommit = true;
+//        plcMax = 100;
+//
+//        Ignite ignite = startGrid();
+//
+//        try {
+//            GridCache<Integer, Integer> cache = ignite.cache(null);
+//
+//            int cnt = 500;
+//
+//            int min = Integer.MAX_VALUE;
+//
+//            int minIdx = 0;
+//
+//            for (int i = 0; i < cnt; i++) {
+//                cache.put(i, i);
+//
+//                int cacheSize = cache.size();
+//
+//                if (i > plcMax && cacheSize < min) {
+//                    min = cacheSize;
+//                    minIdx = i;
+//                }
+//            }
+//
+//            assert min >= plcMax : "Min cache size is too small: " + min;
+//
+//            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;
+//
+//            minIdx = 0;
+//
+//            // Touch.
+//            for (int i = cnt; --i > cnt - plcMax;) {
+//                cache.get(i);
+//
+//                int cacheSize = cache.size();
+//
+//                if (cacheSize < min) {
+//                    min = cacheSize;
+//                    minIdx = i;
+//                }
+//            }
+//
+//            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;
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
+//    }
 
     /** {@inheritDoc} */
     @Override protected CacheFifoEvictionPolicy<String, String> createPolicy(int plcMax) {
@@ -369,7 +365,7 @@ public class GridCacheFifoEvictionPolicySelfTest extends
     /** {@inheritDoc} */
     @Override protected void checkNearPolicies(int endNearPlcSize) {
         for (int i = 0; i < gridCnt; i++)
-            for (Entry<String, String> e : nearPolicy(i).queue())
+            for (EvictableEntry<String, String> e : nearPolicy(i).queue())
                 assert !e.isCached() : "Invalid near policy size: " + nearPolicy(i).queue();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/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 1f10550..add9069 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
@@ -19,11 +19,10 @@ package org.apache.ignite.internal.processors.cache.eviction.lru;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.eviction.*;
 import org.apache.ignite.cache.eviction.lru.*;
 import org.apache.ignite.internal.processors.cache.eviction.*;
 
-import java.util.*;
-
 /**
  * LRU Eviction test.
  */
@@ -34,306 +33,316 @@ public class GridCacheLruEvictionPolicySelfTest extends
      * @throws Exception If failed.
      */
     public void testPolicy() throws Exception {
-        startGrid();
-
-        try {
-            MockEntry e1 = new MockEntry("1", "1");
-            MockEntry e2 = new MockEntry("2", "2");
-            MockEntry e3 = new MockEntry("3", "3");
-            MockEntry e4 = new MockEntry("4", "4");
-            MockEntry e5 = new MockEntry("5", "5");
-
-            CacheLruEvictionPolicy<String, String> p = policy();
-
-            p.setMaxSize(3);
-
-            p.onEntryAccessed(false, e1);
-
-            check(p.queue(), e1);
-
-            p.onEntryAccessed(false, e2);
-
-            check(p.queue(), e1, e2);
-
-            p.onEntryAccessed(false, e3);
-
-            check(p.queue(), e1, e2, e3);
-
-            assert !e1.isEvicted();
-            assert !e2.isEvicted();
-            assert !e3.isEvicted();
-
-            assertEquals(3, p.getCurrentSize());
-
-            p.onEntryAccessed(false, e4);
-
-            check(p.queue(), e2, e3, e4);
-
-            assertEquals(3, p.getCurrentSize());
-
-            assert e1.isEvicted();
-            assert !e2.isEvicted();
-            assert !e3.isEvicted();
-            assert !e4.isEvicted();
-
-            p.onEntryAccessed(false, e5);
-
-            check(p.queue(), e3, e4, e5);
-
-            assertEquals(3, p.getCurrentSize());
-
-            assert e2.isEvicted();
-            assert !e3.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e1 = new MockEntry("1", "1"));
-
-            check(p.queue(), e4, e5, e1);
-
-            assertEquals(3, p.getCurrentSize());
-
-            assert e3.isEvicted();
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e5);
-
-            assertEquals(3, p.getCurrentSize());
-
-            check(p.queue(), e4, e1, e5);
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e1);
-
-            assertEquals(3, p.getCurrentSize());
-
-            check(p.queue(), e4, e5, e1);
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(false, e5);
-
-            assertEquals(3, p.getCurrentSize());
-
-            check(p.queue(), e4, e1, e5);
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(true, e1);
-
-            assertEquals(2, p.getCurrentSize());
-
-            assert !e1.isEvicted();
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(true, e4);
-
-            assertEquals(1, p.getCurrentSize());
-
-            assert !e4.isEvicted();
-            assert !e5.isEvicted();
-
-            p.onEntryAccessed(true, e5);
-
-            assertEquals(0, p.getCurrentSize());
-
-            assert !e5.isEvicted();
-
-            info(p);
-        }
-        finally {
-            stopGrid();
-        }
+        assert false : "ignite-96";
+
+//        startGrid();
+//
+//        try {
+//            MockEntry e1 = new MockEntry("1", "1");
+//            MockEntry e2 = new MockEntry("2", "2");
+//            MockEntry e3 = new MockEntry("3", "3");
+//            MockEntry e4 = new MockEntry("4", "4");
+//            MockEntry e5 = new MockEntry("5", "5");
+//
+//            CacheLruEvictionPolicy<String, String> p = policy();
+//
+//            p.setMaxSize(3);
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            check(p.queue(), e1);
+//
+//            p.onEntryAccessed(false, e2);
+//
+//            check(p.queue(), e1, e2);
+//
+//            p.onEntryAccessed(false, e3);
+//
+//            check(p.queue(), e1, e2, e3);
+//
+//            assert !e1.isEvicted();
+//            assert !e2.isEvicted();
+//            assert !e3.isEvicted();
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            p.onEntryAccessed(false, e4);
+//
+//            check(p.queue(), e2, e3, e4);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            assert e1.isEvicted();
+//            assert !e2.isEvicted();
+//            assert !e3.isEvicted();
+//            assert !e4.isEvicted();
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            check(p.queue(), e3, e4, e5);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            assert e2.isEvicted();
+//            assert !e3.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e1 = new MockEntry("1", "1"));
+//
+//            check(p.queue(), e4, e5, e1);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            assert e3.isEvicted();
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            check(p.queue(), e4, e1, e5);
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            check(p.queue(), e4, e5, e1);
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            assertEquals(3, p.getCurrentSize());
+//
+//            check(p.queue(), e4, e1, e5);
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(true, e1);
+//
+//            assertEquals(2, p.getCurrentSize());
+//
+//            assert !e1.isEvicted();
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(true, e4);
+//
+//            assertEquals(1, p.getCurrentSize());
+//
+//            assert !e4.isEvicted();
+//            assert !e5.isEvicted();
+//
+//            p.onEntryAccessed(true, e5);
+//
+//            assertEquals(0, p.getCurrentSize());
+//
+//            assert !e5.isEvicted();
+//
+//            info(p);
+//        }
+//        finally {
+//            stopGrid();
+//        }
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testMemory() throws Exception {
-        startGrid();
-
-        try {
-            CacheLruEvictionPolicy<String, String> p = policy();
-
-            int max = 10;
-
-            p.setMaxSize(max);
-
-            int cnt = 11;
-
-            for (int i = 0; i < cnt; i++)
-                p.onEntryAccessed(false, new MockEntry(Integer.toString(i), Integer.toString(i)));
-
-            info(p);
-
-            assertEquals(max, p.getCurrentSize());
-        }
-        finally {
-            stopGrid();
-        }
+        assert false : "ignite-96";
+
+//        startGrid();
+//
+//        try {
+//            CacheLruEvictionPolicy<String, String> p = policy();
+//
+//            int max = 10;
+//
+//            p.setMaxSize(max);
+//
+//            int cnt = 11;
+//
+//            for (int i = 0; i < cnt; i++)
+//                p.onEntryAccessed(false, new MockEntry(Integer.toString(i), Integer.toString(i)));
+//
+//            info(p);
+//
+//            assertEquals(max, p.getCurrentSize());
+//        }
+//        finally {
+//            stopGrid();
+//        }
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testMiddleAccess() throws Exception {
-        startGrid();
-
-        try {
-            CacheLruEvictionPolicy<String, String> p = policy();
-
-            int max = 8;
-
-            p.setMaxSize(max);
-
-            MockEntry entry1 = new MockEntry("1", "1");
-            MockEntry entry2 = new MockEntry("2", "2");
-            MockEntry entry3 = new MockEntry("3", "3");
-
-            p.onEntryAccessed(false, entry1);
-            p.onEntryAccessed(false, entry2);
-            p.onEntryAccessed(false, entry3);
-
-            MockEntry[] freqUsed = new MockEntry[] {
-                new MockEntry("4", "4"),
-                new MockEntry("5", "5"),
-                new MockEntry("6", "6"),
-                new MockEntry("7", "7"),
-                new MockEntry("8", "7")
-            };
-
-            for (MockEntry e : freqUsed)
-                p.onEntryAccessed(false, e);
-
-            for (MockEntry e : freqUsed)
-                assert !e.isEvicted();
-
-            int cnt = 1001;
-
-            for (int i = 0; i < cnt; i++)
-                p.onEntryAccessed(false, entry(freqUsed, i % freqUsed.length));
-
-            info(p);
-
-            assertEquals(max, p.getCurrentSize());
-        }
-        finally {
-            stopGrid();
-        }
+        assert false : "ignite-96";
+
+//        startGrid();
+//
+//        try {
+//            CacheLruEvictionPolicy<String, String> p = policy();
+//
+//            int max = 8;
+//
+//            p.setMaxSize(max);
+//
+//            MockEntry entry1 = new MockEntry("1", "1");
+//            MockEntry entry2 = new MockEntry("2", "2");
+//            MockEntry entry3 = new MockEntry("3", "3");
+//
+//            p.onEntryAccessed(false, entry1);
+//            p.onEntryAccessed(false, entry2);
+//            p.onEntryAccessed(false, entry3);
+//
+//            MockEntry[] freqUsed = new MockEntry[] {
+//                new MockEntry("4", "4"),
+//                new MockEntry("5", "5"),
+//                new MockEntry("6", "6"),
+//                new MockEntry("7", "7"),
+//                new MockEntry("8", "7")
+//            };
+//
+//            for (MockEntry e : freqUsed)
+//                p.onEntryAccessed(false, e);
+//
+//            for (MockEntry e : freqUsed)
+//                assert !e.isEvicted();
+//
+//            int cnt = 1001;
+//
+//            for (int i = 0; i < cnt; i++)
+//                p.onEntryAccessed(false, entry(freqUsed, i % freqUsed.length));
+//
+//            info(p);
+//
+//            assertEquals(max, p.getCurrentSize());
+//        }
+//        finally {
+//            stopGrid();
+//        }
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testRandom() throws Exception {
-        startGrid();
-
-        try {
-            CacheLruEvictionPolicy<String, String> p = policy();
-
-            int max = 10;
-
-            p.setMaxSize(max);
-
-            Random rand = new Random();
-
-            int keys = 31;
-
-            MockEntry[] lrus = new MockEntry[keys];
-
-            for (int i = 0; i < lrus.length; i++)
-                lrus[i] = new MockEntry(Integer.toString(i));
-
-            int runs = 500000;
-
-            for (int i = 0; i < runs; i++) {
-                boolean rmv = rand.nextBoolean();
-
-                int j = rand.nextInt(lrus.length);
-
-                MockEntry e = entry(lrus, j);
-
-                if (rmv)
-                    lrus[j] = new MockEntry(Integer.toString(j));
-
-                p.onEntryAccessed(rmv, e);
-            }
-
-            info(p);
-
-            assert p.getCurrentSize() <= max;
-        }
-        finally {
-            stopGrid();
-        }
+        assert false : "ignite-96";
+
+//        startGrid();
+//
+//        try {
+//            CacheLruEvictionPolicy<String, String> p = policy();
+//
+//            int max = 10;
+//
+//            p.setMaxSize(max);
+//
+//            Random rand = new Random();
+//
+//            int keys = 31;
+//
+//            MockEntry[] lrus = new MockEntry[keys];
+//
+//            for (int i = 0; i < lrus.length; i++)
+//                lrus[i] = new MockEntry(Integer.toString(i));
+//
+//            int runs = 500000;
+//
+//            for (int i = 0; i < runs; i++) {
+//                boolean rmv = rand.nextBoolean();
+//
+//                int j = rand.nextInt(lrus.length);
+//
+//                MockEntry e = entry(lrus, j);
+//
+//                if (rmv)
+//                    lrus[j] = new MockEntry(Integer.toString(j));
+//
+//                p.onEntryAccessed(rmv, e);
+//            }
+//
+//            info(p);
+//
+//            assert p.getCurrentSize() <= max;
+//        }
+//        finally {
+//            stopGrid();
+//        }
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAllowEmptyEntries() throws Exception {
-        try {
-            startGrid();
-
-            MockEntry e1 = new MockEntry("1");
-
-            e1.setValue("val");
-
-            MockEntry e2 = new MockEntry("2");
-
-            MockEntry e3 = new MockEntry("3");
-
-            e3.setValue("val");
-
-            MockEntry e4 = new MockEntry("4");
-
-            MockEntry e5 = new MockEntry("5");
-
-            e5.setValue("val");
-
-            CacheLruEvictionPolicy<String, String> p = policy();
-
-            p.setMaxSize(10);
-
-            p.onEntryAccessed(false, e1);
-
-            assertFalse(e1.isEvicted());
-
-            p.onEntryAccessed(false, e2);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e2.isEvicted());
-
-            p.onEntryAccessed(false, e3);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-
-            p.onEntryAccessed(false, e4);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e4.isEvicted());
-
-            p.onEntryAccessed(false, e5);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e5.isEvicted());
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+
+//        try {
+//            startGrid();
+//
+//            MockEntry e1 = new MockEntry("1");
+//
+//            e1.setValue("val");
+//
+//            MockEntry e2 = new MockEntry("2");
+//
+//            MockEntry e3 = new MockEntry("3");
+//
+//            e3.setValue("val");
+//
+//            MockEntry e4 = new MockEntry("4");
+//
+//            MockEntry e5 = new MockEntry("5");
+//
+//            e5.setValue("val");
+//
+//            CacheLruEvictionPolicy<String, String> p = policy();
+//
+//            p.setMaxSize(10);
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            assertFalse(e1.isEvicted());
+//
+//            p.onEntryAccessed(false, e2);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e2.isEvicted());
+//
+//            p.onEntryAccessed(false, e3);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//
+//            p.onEntryAccessed(false, e4);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//            assertFalse(e4.isEvicted());
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//            assertFalse(e5.isEvicted());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
     /**
@@ -414,7 +423,7 @@ public class GridCacheLruEvictionPolicySelfTest extends
     /** {@inheritDoc} */
     @Override protected void checkNearPolicies(int endNearPlcSize) {
         for (int i = 0; i < gridCnt; i++)
-            for (Entry<String, String> e : nearPolicy(i).queue())
+            for (EvictableEntry<String, String> e : nearPolicy(i).queue())
                 assert !e.isCached() : "Invalid near policy size: " + nearPolicy(i).queue();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/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 2e95b08..66b85ef 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
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.eviction.random;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.random.*;
 import org.apache.ignite.internal.processors.cache.eviction.*;
 import org.jetbrains.annotations.*;
@@ -106,60 +105,62 @@ public class GridCacheRandomEvictionPolicySelfTest extends
      * @throws Exception If failed.
      */
     public void testAllowEmptyEntries() throws Exception {
-        try {
-            startGrid();
-
-            GridCache<String, String> c = cache();
-
-            MockEntry e1 = new MockEntry("1", c);
-
-            e1.setValue("val");
-
-            MockEntry e2 = new MockEntry("2", c);
-
-            MockEntry e3 = new MockEntry("3", c);
-
-            e3.setValue("val");
-
-            MockEntry e4 = new MockEntry("4", c);
-
-            MockEntry e5 = new MockEntry("5", c);
-
-            e5.setValue("val");
-
-            CacheRandomEvictionPolicy<String, String> p = policy();
-
-            p.setMaxSize(10);
-
-            p.onEntryAccessed(false, e1);
-
-            assertFalse(e1.isEvicted());
-
-            p.onEntryAccessed(false, e2);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e2.isEvicted());
-
-            p.onEntryAccessed(false, e3);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-
-            p.onEntryAccessed(false, e4);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e4.isEvicted());
-
-            p.onEntryAccessed(false, e5);
-
-            assertFalse(e1.isEvicted());
-            assertFalse(e3.isEvicted());
-            assertFalse(e5.isEvicted());
-        }
-        finally {
-            stopAllGrids();
-        }
+        assert false : "ignite-96";
+
+//        try {
+//            startGrid();
+//
+//            GridCache<String, String> c = cache();
+//
+//            MockEntry e1 = new MockEntry("1", c);
+//
+//            e1.setValue("val");
+//
+//            MockEntry e2 = new MockEntry("2", c);
+//
+//            MockEntry e3 = new MockEntry("3", c);
+//
+//            e3.setValue("val");
+//
+//            MockEntry e4 = new MockEntry("4", c);
+//
+//            MockEntry e5 = new MockEntry("5", c);
+//
+//            e5.setValue("val");
+//
+//            CacheRandomEvictionPolicy<String, String> p = policy();
+//
+//            p.setMaxSize(10);
+//
+//            p.onEntryAccessed(false, e1);
+//
+//            assertFalse(e1.isEvicted());
+//
+//            p.onEntryAccessed(false, e2);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e2.isEvicted());
+//
+//            p.onEntryAccessed(false, e3);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//
+//            p.onEntryAccessed(false, e4);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//            assertFalse(e4.isEvicted());
+//
+//            p.onEntryAccessed(false, e5);
+//
+//            assertFalse(e1.isEvicted());
+//            assertFalse(e3.isEvicted());
+//            assertFalse(e5.isEvicted());
+//        }
+//        finally {
+//            stopAllGrids();
+//        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08db7f3c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
index b61ce27..66cb5c7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.spi.swapspace.file.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 
@@ -195,12 +196,14 @@ public abstract class GridCacheSwapScanQueryAbstractSelfTest extends GridCommonA
         CacheProjection prj;
 
         if (portableEnabled()) {
-            prj = cache.projection(new IgnitePredicate<Entry<PortableObject, PortableObject>>() {
-                @Override public boolean apply(Entry<PortableObject, PortableObject> e) {
+            prj = cache.projection(new IgnitePredicate<Cache.Entry<PortableObject, PortableObject>>() {
+                @Override public boolean apply(Cache.Entry<PortableObject, PortableObject> e) {
                     Key key = e.getKey().deserialize();
-                    Person val = e.peek().deserialize();
+                    Person val = e.getValue().deserialize();
 
-                    assertNotNull(e.version());
+                    assert false : "ignite-96";
+
+                    // assertNotNull(e.version());
 
                     assertEquals(key.id, (Integer)val.salary);
 
@@ -209,12 +212,14 @@ public abstract class GridCacheSwapScanQueryAbstractSelfTest extends GridCommonA
             });
         }
         else {
-            prj = cache.projection(new IgnitePredicate<Entry<Key, Person>>() {
-                @Override public boolean apply(Entry<Key, Person> e) {
+            prj = cache.projection(new IgnitePredicate<Cache.Entry<Key, Person>>() {
+                @Override public boolean apply(Cache.Entry<Key, Person> e) {
                     Key key = e.getKey();
-                    Person val = e.peek();
+                    Person val = e.getValue();
+
+                    assert false : "ignite-96";
 
-                    assertNotNull(e.version());
+//                    assertNotNull(e.version());
 
                     assertEquals(key.id, (Integer)val.salary);
 


Mime
View raw message