ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [33/53] [abbrv] ignite git commit: ignite-4535 : Adapted tests to set on-heap cache if they use eviction policy.
Date Mon, 10 Apr 2017 15:55:40 GMT
ignite-4535 : Adapted tests to set on-heap cache if they use eviction policy.


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

Branch: refs/heads/ignite-3477-master
Commit: 6ebddaebc020ccf5dd091f4ea2029395712c73fe
Parents: 0bad8c6
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Thu Apr 6 16:54:45 2017 +0300
Committer: Ilya Lantukh <ilantukh@gridgain.com>
Committed: Thu Apr 6 16:54:45 2017 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       |   1 +
 .../processors/cache/GridCacheProcessor.java    |   8 +-
 .../utils/PlatformConfigurationUtils.java       |   3 +
 .../internal/ClusterNodeMetricsSelfTest.java    |   1 +
 .../cache/CacheConfigurationLeakTest.java       |   1 +
 .../CacheSerializableTransactionsTest.java      |   2 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |   2 +-
 ...idCacheConfigurationConsistencySelfTest.java |  41 +------
 .../GridCacheEvictionEventAbstractTest.java     |   1 +
 .../cache/GridCacheLifecycleAwareSelfTest.java  |   1 +
 .../cache/GridCacheObjectToStringSelfTest.java  |   1 +
 .../cache/GridCacheReloadSelfTest.java          |   1 +
 .../GridCacheTtlManagerEvictionSelfTest.java    |   1 +
 ...gniteCacheLoadRebalanceEvictionSelfTest.java |   1 +
 ...gniteCacheP2pUnmarshallingNearErrorTest.java |   1 +
 .../cache/IgniteCachePeekModesAbstractTest.java |   1 +
 .../IgniteCacheReadThroughEvictionSelfTest.java |   1 +
 .../GridCacheAbstractNodeRestartSelfTest.java   |   1 +
 .../IgniteCacheTxIteratorSelfTest.java          |   1 +
 ...GridCacheDhtEvictionNearReadersSelfTest.java |   1 +
 .../dht/GridCacheDhtEvictionSelfTest.java       |   1 +
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |   1 +
 .../IgniteCachePutRetryAbstractSelfTest.java    |   2 +
 .../GridCachePartitionedEvictionSelfTest.java   |   1 +
 ...ePartitionedMultiThreadedPutGetSelfTest.java |   1 +
 .../cache/eviction/EvictionAbstractTest.java    |   1 +
 ...heConcurrentEvictionConsistencySelfTest.java |   1 +
 .../GridCacheConcurrentEvictionsSelfTest.java   |   1 +
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |   3 +-
 .../GridCacheEvictableEntryEqualsSelfTest.java  |   1 +
 .../GridCacheEvictionFilterSelfTest.java        |   2 +-
 .../GridCacheEvictionLockUnlockSelfTest.java    |   1 +
 .../GridCacheEvictionTouchSelfTest.java         |   1 +
 .../SortedEvictionPolicyPerformanceTest.java    |   1 +
 ...sCachePerBlockLruEvictionPolicySelfTest.java |   1 +
 .../loadtests/GridCacheMultiNodeLoadTest.java   |   1 +
 .../GridCachePartitionedAtomicLongLoadTest.java |   1 +
 .../cache/CacheQueryEvictDataLostTest.java      | 120 +++++++++++++++++++
 .../CacheQueryOffheapEvictDataLostTest.java     | 119 ------------------
 .../CacheRandomOperationsMultithreadedTest.java |   1 +
 .../cache/GridIndexingWithNoopSwapSelfTest.java |   1 +
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   1 +
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |   1 +
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |   2 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   4 +-
 45 files changed, 177 insertions(+), 164 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index f886dce..383a2a6 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -459,6 +459,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
         name = cc.getName();
         nearCfg = cc.getNearConfiguration();
         nodeFilter = cc.getNodeFilter();
+        onheapCache = cc.isOnheapCacheEnabled();
         partitionLossPolicy = cc.getPartitionLossPolicy();
         pluginCfgs = cc.getPluginConfigurations();
         qryEntities = cc.getQueryEntities() == Collections.<QueryEntity>emptyList() ? null : cc.getQueryEntities();

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index df25e46..987c0c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -489,6 +489,10 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (cc.getAtomicityMode() == ATOMIC)
             assertParameter(cc.getTransactionManagerLookupClassName() == null,
                 "transaction manager can not be used with ATOMIC cache");
+
+        if (cc.getEvictionPolicy() != null && !cc.isOnheapCacheEnabled())
+            throw new IgniteCheckedException("Onheap cache must be enabled if eviction policy is configured [cacheName="
+                + U.maskName(cc.getName()) + "]");
     }
 
     /**
@@ -1448,7 +1452,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
         GridCacheEventManager evtMgr = new GridCacheEventManager();
-        CacheEvictionManager evictMgr = (nearEnabled || cfg.getEvictionPolicy() != null) ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
+        CacheEvictionManager evictMgr = (nearEnabled || cfg.isOnheapCacheEnabled()) ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
         GridCacheQueryManager qryMgr = queryManager(cfg);
         CacheContinuousQueryManager contQryMgr = new CacheContinuousQueryManager();
         CacheDataStructuresManager dataStructuresMgr = new CacheDataStructuresManager();
@@ -1595,7 +1599,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
              * 7. GridCacheTtlManager.
              * ===============================================
              */
-            evictMgr = cfg.getEvictionPolicy() != null ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
+            evictMgr = cfg.isOnheapCacheEnabled() ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
             evtMgr = new GridCacheEventManager();
             pluginMgr = new CachePluginManager(ctx, cfg);
             drMgr = pluginMgr.createComponent(GridCacheDrManager.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 2f353af..f8709ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -196,6 +196,9 @@ public class PlatformConfigurationUtils {
             ccfg.setNearConfiguration(readNearConfiguration(in));
 
         ccfg.setEvictionPolicy(readEvictionPolicy(in));
+        if (ccfg.getEvictionPolicy() != null)
+            ccfg.setOnheapCacheEnabled(true);
+
         ccfg.setAffinity(readAffinityFunction(in));
         ccfg.setExpiryPolicyFactory(readExpiryPolicyFactory(in));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
index b43b1f7..2cb36f9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
@@ -96,6 +96,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(0);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
 
         return cfg.setCacheConfiguration(ccfg);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
index b51932f..4eef3cb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
@@ -69,6 +69,7 @@ public class CacheConfigurationLeakTest extends GridCommonAbstractTest {
                     CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
                     ccfg.setName("cache-" + idx + "-" + i);
                     ccfg.setEvictionPolicy(new LruEvictionPolicy(1000));
+                    ccfg.setOnheapCacheEnabled(true);
 
                     IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
index 3d29315..bfd7806 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
@@ -4345,6 +4345,8 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
 
                 ccfg.setEvictionPolicy(plc);
 
+                ccfg.setOnheapCacheEnabled(true);
+
                 srv.createCache(ccfg);
 
                 cacheNames.add(ccfg.getName());

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 491abff..4776456 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -144,7 +144,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
             plc.setMaxSize(1000);
 
             cc.setEvictionPolicy(plc);
-            cc.setEvictSynchronized(false);
+            cc.setOnheapCacheEnabled(true);
             cc.setWriteSynchronizationMode(FULL_SYNC);
             cc.setRebalanceMode(NONE);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/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 74c5348..59a5ebb 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
@@ -362,6 +362,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionPolicy(new FifoEvictionPolicy());
+                    cfg.setOnheapCacheEnabled(true);
                     return null;
                 }
             },
@@ -383,6 +384,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionPolicy(new SortedEvictionPolicy());
+                    cfg.setOnheapCacheEnabled(true);
                     return null;
                 }
             },
@@ -390,6 +392,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionPolicy(new FifoEvictionPolicy());
+                    cfg.setOnheapCacheEnabled(true);
                     return null;
                 }
             }
@@ -443,42 +446,6 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
     /**
      * @throws Exception If failed.
      */
-    public void testDifferentEvictSynchronized() throws Exception {
-        cacheMode = PARTITIONED;
-
-        checkSecondGridStartFails(
-            new C1<CacheConfiguration, Void>() {
-                /** {@inheritDoc} */
-                @Override public Void apply(CacheConfiguration cfg) {
-                    cfg.setEvictSynchronized(true);
-
-                    FifoEvictionPolicy plc = new FifoEvictionPolicy();
-
-                    plc.setMaxSize(100);
-
-                    cfg.setEvictionPolicy(plc);
-                    return null;
-                }
-            },
-            new C1<CacheConfiguration, Void>() {
-                /** {@inheritDoc} */
-                @Override public Void apply(CacheConfiguration cfg) {
-                    cfg.setEvictSynchronized(false);
-
-                    FifoEvictionPolicy plc = new FifoEvictionPolicy();
-
-                    plc.setMaxSize(100);
-
-                    cfg.setEvictionPolicy(plc);
-                    return null;
-                }
-            }
-        );
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testDifferentAtomicity() throws Exception {
         cacheMode = PARTITIONED;
 
@@ -672,6 +639,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 cfg.setAffinity(new TestRendezvousAffinityFunction());
 
                 cfg.setEvictionPolicy(new FifoEvictionPolicy());
+                cfg.setOnheapCacheEnabled(true);
 
                 cfg.setCacheStoreFactory(new IgniteCacheAbstractTest.TestStoreFactory());
                 cfg.setReadThrough(true);
@@ -690,6 +658,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 cfg.setAffinity(new RendezvousAffinityFunction());
 
                 cfg.setEvictionPolicy(new LruEvictionPolicy());
+                cfg.setOnheapCacheEnabled(true);
 
                 cfg.setCacheStoreFactory(null);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
index 55eae2b..793317d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
@@ -71,6 +71,7 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
         cc.setCacheMode(cacheMode());
         cc.setAtomicityMode(atomicityMode());
         cc.setEvictionPolicy(new FifoEvictionPolicy());
+        cc.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
index 089e278..22d94fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
@@ -318,6 +318,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
         TestEvictionPolicy evictionPlc = new TestEvictionPolicy();
 
         ccfg.setEvictionPolicy(evictionPlc);
+        ccfg.setOnheapCacheEnabled(true);
 
         lifecycleAwares.add(evictionPlc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/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 98d5682..54a3aa9 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
@@ -68,6 +68,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
 
         cacheCfg.setCacheMode(cacheMode);
         cacheCfg.setEvictionPolicy(evictionPlc);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
index 8814aa5..f3340f4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
@@ -82,6 +82,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(MAX_CACHE_ENTRIES);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
 
         final CacheStore store = new CacheStoreAdapter<Integer, Integer>() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
index 57d5007..23f06c6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
@@ -63,6 +63,7 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
         ccfg.setCacheMode(cacheMode);
         ccfg.setEagerTtl(true);
         ccfg.setEvictionPolicy(new FifoEvictionPolicy(ENTRIES_LIMIT, 100));
+        ccfg.setOnheapCacheEnabled(true);
         ccfg.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.HOURS, 12)));
 
         cfg.setCacheConfiguration(ccfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
index 6791172..bf8c416 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
@@ -80,6 +80,7 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract
         cacheCfg.setBackups(1);
         cacheCfg.setReadFromBackup(true);
         cacheCfg.setEvictionPolicy(evictionPolicy);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setStatisticsEnabled(true);
 
         cacheCfg.setWriteThrough(false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
index e020ae4..87d852f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
@@ -39,6 +39,7 @@ public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnma
             cfg.getCacheConfiguration()[0].setEvictSynchronized(true);
             cfg.getCacheConfiguration()[0].setEvictSynchronizedKeyBufferSize(1);
             cfg.getCacheConfiguration()[0].setEvictionPolicy(new FifoEvictionPolicy(1));
+            cfg.getCacheConfiguration()[0].setOnheapCacheEnabled(true);
         }
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index d84c4a7..8681be2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -98,6 +98,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
         plc.setMaxSize(HEAP_ENTRIES);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
 
         return ccfg;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
index 6debaa0..00431b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
@@ -155,6 +155,7 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar
         CacheConfiguration<Object, Object> cc = variationConfig("eviction");
 
         cc.setEvictionPolicy(new FifoEvictionPolicy(1));
+        cc.setOnheapCacheEnabled(true);
 
         final IgniteCache<Object, Object> cache = ig.createCache(cc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index 455fc21..d268e47 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -146,6 +146,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
             plc.setMaxSize(100);
 
             ccfg.setEvictionPolicy(plc);
+            ccfg.setOnheapCacheEnabled(true);
         }
 
         c.setCacheConfiguration(ccfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
index ff9425e..cdf996d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
@@ -75,6 +75,7 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
 
         if (useEvictPlc) {
             ccfg.setEvictionPolicy(new FifoEvictionPolicy(50));
+            ccfg.setOnheapCacheEnabled(true);
         }
 
         return ccfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
index 2d2ef41..834861e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
@@ -89,6 +89,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT
         plc.setMaxSize(10);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
index 17c27a2..64baf84 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
@@ -97,6 +97,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(10000);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
 
         cfg.setCacheConfiguration(cacheCfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
index b48f6f9..1b9b0d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
@@ -86,6 +86,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(100000);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(ccfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
index 5339516..ee83990 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
@@ -106,6 +106,8 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
             plc.setMaxSize(100);
 
             cfg.setEvictionPolicy(plc);
+
+            cfg.setOnheapCacheEnabled(true);
         }
 
         if (store) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
index 67422b7..f5ec2c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
@@ -90,6 +90,7 @@ public class GridCachePartitionedEvictionSelfTest extends GridCacheAbstractSelfT
         FifoEvictionPolicy plc = new FifoEvictionPolicy();
         plc.setMaxSize(EVICT_CACHE_SIZE);
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         FifoEvictionPolicy nearPlc = new FifoEvictionPolicy();
         nearPlc.setMaxSize(EVICT_CACHE_SIZE);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
index beb9082..86b2217 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
@@ -77,6 +77,7 @@ public class GridCachePartitionedMultiThreadedPutGetSelfTest extends GridCommonA
         plc.setMaxMemorySize(1000);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
         cc.setAtomicityMode(TRANSACTIONAL);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
index 441afd1..dfb4c68 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
@@ -110,6 +110,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
 
         cc.setCacheMode(mode);
         cc.setEvictionPolicy(createPolicy(plcMax));
+        cc.setOnheapCacheEnabled(true);
         cc.setEvictSynchronized(evictSync);
         cc.setWriteSynchronizationMode(syncCommit ? FULL_SYNC : FULL_ASYNC);
         cc.setStartSize(plcMax);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
index 0e91e30..e61bef6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
@@ -84,6 +84,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
         cc.setNearConfiguration(null);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
index 8eb029e..31d7c26 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
@@ -75,6 +75,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest
         cc.setNearConfiguration(null);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
index 0c4ac3f..04fdf77 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
@@ -84,8 +84,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
 
         cc.setEvictionPolicy(plc);
         cc.setEvictSynchronizedKeyBufferSize(1);
-
-        cc.setEvictSynchronized(true);
+        cc.setOnheapCacheEnabled(true);
 
         if (testStore != null) {
             cc.setCacheStoreFactory(singletonFactory(testStore));

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
index 2b40365..98c8b77 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
@@ -39,6 +39,7 @@ public class GridCacheEvictableEntryEqualsSelfTest extends GridCommonAbstractTes
             CacheConfiguration<TestKey, String> cfg = new CacheConfiguration<>("test");
 
             cfg.setEvictionPolicy(new TestEvictionPolicy());
+            cfg.setOnheapCacheEnabled(true);
 
             IgniteCache<TestKey, String> cache = ignite.createCache(cfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
index db23661..eb675ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
@@ -74,7 +74,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
 
         cc.setCacheMode(mode);
         cc.setEvictionPolicy(notSerializableProxy(plc, EvictionPolicy.class));
-        cc.setEvictSynchronized(false);
+        cc.setOnheapCacheEnabled(true);
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cc.setEvictionFilter(notSerializableProxy(filter, org.apache.ignite.cache.eviction.EvictionFilter.class));
         cc.setRebalanceMode(SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
index ba9b2d7..55b7b63 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
@@ -73,6 +73,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest
         cc.setCacheMode(mode);
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cc.setEvictionPolicy(new EvictionPolicy());
+        cc.setOnheapCacheEnabled(true);
         cc.setAtomicityMode(TRANSACTIONAL);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/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 34bb2a8..396083e 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
@@ -75,6 +75,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         cc.setWriteSynchronizationMode(FULL_SYNC);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         CacheStore store = new GridCacheGenericTestStore<Object, Object>() {
             @Override public Object load(Object key) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
index de41691..b583fb0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
@@ -80,6 +80,7 @@ public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest
         plc.setMaxSize(MAX_SIZE);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
         ccfg.setEvictSynchronized(false);
 
         cfg.setPeerClassLoadingEnabled(false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
index 32e7e17..9e24ba8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
@@ -121,6 +121,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra
         evictPlc = new IgfsPerBlockLruEvictionPolicy();
 
         dataCacheCfg.setEvictionPolicy(evictPlc);
+        dataCacheCfg.setOnheapCacheEnabled(true);
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(128));
         dataCacheCfg.setBackups(0);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
index e40ce76..ac98f9c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
@@ -69,6 +69,7 @@ public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest {
         plc.setMaxSize(100000);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setBackups(1);
 
         cacheCfg.setRebalanceMode(SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
index 25b1059..6dfa609 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
@@ -79,6 +79,7 @@ public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTe
         plc.setMaxSize(1000);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
         cc.setBackups(1);
         cc.setAffinity(new RendezvousAffinityFunction(true));
         cc.setEvictSynchronized(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
new file mode 100644
index 0000000..7b79c72
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import java.io.Serializable;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ *
+ */
+public class CacheQueryEvictDataLostTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEYS = 100_000;
+
+    /**
+     *
+     */
+    public CacheQueryEvictDataLostTest() {
+        super(true);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration() throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration();
+
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+        ccfg.setName("cache-1");
+        ccfg.setEvictionPolicy(new LruEvictionPolicy(10));
+        ccfg.setOnheapCacheEnabled(true);
+        ccfg.setIndexedTypes(Integer.class, TestData.class);
+
+        cfg.setCacheConfiguration(ccfg);
+
+        return cfg;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testQueryDataLost() throws Exception {
+        final long stopTime = U.currentTimeMillis() + 30_000;
+
+        GridTestUtils.runMultiThreaded(new IgniteInClosure<Integer>() {
+            void putGet(IgniteCache<Object, Object> cache) {
+                ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+                for (int i = 0; i < KEYS; i++) {
+                    cache.put(rnd.nextInt(KEYS), new TestData(i));
+
+                    cache.get(rnd.nextInt(KEYS));
+                }
+            }
+
+            void query(IgniteCache<Object, Object> cache) {
+                SqlQuery<Object, Object> qry1 = new SqlQuery<>(TestData.class, "_key > ?");
+                qry1.setArgs(KEYS / 2);
+
+                cache.query(qry1).getAll();
+
+                SqlQuery<Object, Object> qry2 = new SqlQuery<>(TestData.class, "idxVal > ?");
+                qry2.setArgs(KEYS / 2);
+
+                cache.query(qry2).getAll();
+            }
+
+            @Override public void apply(Integer idx) {
+                IgniteCache<Object, Object> cache1 = grid().cache("cache-1");
+
+                while (U.currentTimeMillis() < stopTime) {
+                    if (idx == 0)
+                        putGet(cache1);
+                    else
+                        query(cache1);
+                }
+            }
+        }, 10, "test-thread");
+    }
+
+    /**
+     *
+     */
+    static class TestData implements Serializable {
+        /** */
+        @QuerySqlField(index = true)
+        private int idxVal;
+
+        /**
+         * @param idxVal Value.
+         */
+        public TestData(int idxVal) {
+            this.idxVal = idxVal;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
deleted file mode 100644
index 0d9948d..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import java.io.Serializable;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- *
- */
-public class CacheQueryOffheapEvictDataLostTest extends GridCommonAbstractTest {
-    /** */
-    private static final int KEYS = 100_000;
-
-    /**
-     *
-     */
-    public CacheQueryOffheapEvictDataLostTest() {
-        super(true);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration() throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration();
-
-        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
-
-        ccfg.setName("cache-1");
-        ccfg.setEvictionPolicy(new LruEvictionPolicy(10));
-        ccfg.setIndexedTypes(Integer.class, TestData.class);
-
-        cfg.setCacheConfiguration(ccfg);
-
-        return cfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testQueryDataLost() throws Exception {
-        final long stopTime = U.currentTimeMillis() + 30_000;
-
-        GridTestUtils.runMultiThreaded(new IgniteInClosure<Integer>() {
-            void putGet(IgniteCache<Object, Object> cache) {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < KEYS; i++) {
-                    cache.put(rnd.nextInt(KEYS), new TestData(i));
-
-                    cache.get(rnd.nextInt(KEYS));
-                }
-            }
-
-            void query(IgniteCache<Object, Object> cache) {
-                SqlQuery<Object, Object> qry1 = new SqlQuery<>(TestData.class, "_key > ?");
-                qry1.setArgs(KEYS / 2);
-
-                cache.query(qry1).getAll();
-
-                SqlQuery<Object, Object> qry2 = new SqlQuery<>(TestData.class, "idxVal > ?");
-                qry2.setArgs(KEYS / 2);
-
-                cache.query(qry2).getAll();
-            }
-
-            @Override public void apply(Integer idx) {
-                IgniteCache<Object, Object> cache1 = grid().cache("cache-1");
-
-                while (U.currentTimeMillis() < stopTime) {
-                    if (idx == 0)
-                        putGet(cache1);
-                    else
-                        query(cache1);
-                }
-            }
-        }, 10, "test-thread");
-    }
-
-    /**
-     *
-     */
-    static class TestData implements Serializable {
-        /** */
-        @QuerySqlField(index = true)
-        private int idxVal;
-
-        /**
-         * @param idxVal Value.
-         */
-        public TestData(int idxVal) {
-            this.idxVal = idxVal;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
index 24308cf..9861153 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
@@ -348,6 +348,7 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
         ccfg.setEvictionPolicy(evictionPlc);
+        ccfg.setOnheapCacheEnabled(evictionPlc != null);
 
         if (cacheMode == PARTITIONED)
             ccfg.setBackups(1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index deeac51..d16e8bb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -67,6 +67,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(1000);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
         cc.setBackups(1);
         cc.setAtomicityMode(TRANSACTIONAL);
         cc.setIndexedTypes(

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index 382b1ed..1f2ec99 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -120,6 +120,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         }
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(plc != null);
 
         return cacheCfg;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
index c07d7a5..02b6b3b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
@@ -82,6 +82,7 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(MAX_CACHE_SIZE);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
         ccfg.setIndexedTypes(Integer.class, Integer.class);
         ccfg.setBackups(2);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
index ad3e320..8408ad0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
@@ -112,7 +112,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
         startGridsMultiThreaded(1, true);
 
         final IgniteCache<Object, Object> cache = ignite(0).createCache(cacheConfig("org", true, Integer.class, Organization.class)
-            .setEvictionPolicy(new FifoEvictionPolicy(10)));
+            .setEvictionPolicy(new FifoEvictionPolicy(10)).setOnheapCacheEnabled(true));
 
         for (int i = 0; i < 20; i++)
             cache.put(i, new Organization("org-" + i));

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebddaeb/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 9da2247..f720b94 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -26,7 +26,7 @@ import org.apache.ignite.internal.processors.cache.CachePartitionedQueryDetailMe
 import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
 import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheQueryNewClientSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheQueryOffheapEvictDataLostTest;
+import org.apache.ignite.internal.processors.cache.CacheQueryEvictDataLostTest;
 import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsDistributedSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
@@ -197,7 +197,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
 
         suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
 
-        suite.addTestSuite(CacheQueryOffheapEvictDataLostTest.class);
+        suite.addTestSuite(CacheQueryEvictDataLostTest.class);
 
         // Ignite cache and H2 comparison.
         suite.addTestSuite(BaseH2CompareQueryTest.class);


Mime
View raw message