You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/12 07:33:44 UTC

[13/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
deleted file mode 100644
index 9c666a4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
+++ /dev/null
@@ -1,679 +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.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.locks.Lock;
-import javax.cache.Cache;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CachePeekMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.jetbrains.annotations.Nullable;
-import org.junit.Assert;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-
-/**
- *
- */
-public abstract class GridCacheOffHeapTieredAbstractSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    protected boolean binaryEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAtomicWriteOrderMode(PRIMARY);
-
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setOffHeapMaxMemory(1024 * 1024);
-
-        return ccfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTransform() throws Exception {
-        IgniteCache<Integer, Integer> cache = grid(0).cache(null);
-
-        checkTransform(primaryKey(cache));
-
-        checkTransform(backupKey(cache));
-
-        checkTransform(nearKey(cache));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkTransform(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNull("Unexpected value: " + val, val);
-
-                return null;
-            }
-        });
-
-        c.put(key, 1);
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNotNull("Unexpected value: " + val, val);
-
-                assertEquals((Integer) 1, val);
-
-                e.setValue(val + 1);
-
-                return null;
-            }
-        });
-
-        assertEquals((Integer)2, c.get(key));
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNotNull("Unexpected value: " + val, val);
-
-                assertEquals((Integer)2, val);
-
-                e.setValue(val);
-
-                return null;
-            }
-        });
-
-        assertEquals((Integer)2, c.get(key));
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNotNull("Unexpected value: " + val, val);
-
-                assertEquals((Integer)2, val);
-
-                e.remove();
-
-                return null;
-            }
-        });
-
-        assertNull(c.get(key));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemove() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkPutGetRemove(primaryKey(c));
-
-        checkPutGetRemove(backupKey(c));
-
-        checkPutGetRemove(nearKey(c));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemoveByteArray() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkPutGetRemoveByteArray(primaryKey(c));
-
-        checkPutGetRemoveByteArray(backupKey(c));
-
-        checkPutGetRemoveByteArray(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemove(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkValue(key, null);
-
-        assertNull(c.getAndPut(key, key));
-
-        checkValue(key, key);
-
-        assertEquals(key, c.getAndRemove(key));
-
-        checkValue(key, null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutGetRemoveTx(key, PESSIMISTIC);
-
-            checkPutGetRemoveTx(key, OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveByteArray(Integer key) throws Exception {
-        IgniteCache<Integer, byte[]> c = grid(0).cache(null);
-
-        checkValue(key, null);
-
-        byte[] val = new byte[] {key.byteValue()};
-
-        assertNull(c.getAndPut(key, val));
-
-        checkValue(key, val);
-
-        Assert.assertArrayEquals(val, c.getAndRemove(key));
-
-        checkValue(key, null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutGetRemoveTxByteArray(key, PESSIMISTIC);
-
-            checkPutGetRemoveTxByteArray(key, OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param key Key,
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveTx(Integer key, TransactionConcurrency txConcurrency) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertNull(c.getAndPut(key, key));
-
-        tx.commit();
-
-        checkValue(key, key);
-
-        tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertEquals(key, c.getAndRemove(key));
-
-        tx.commit();
-
-        checkValue(key, null);
-    }
-
-    /**
-     * @param key Key,
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveTxByteArray(Integer key, TransactionConcurrency txConcurrency) throws Exception {
-        IgniteCache<Integer, byte[]> c = grid(0).cache(null);
-
-        Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        byte[] val = new byte[] {key.byteValue()};
-
-        assertNull(c.getAndPut(key, val));
-
-        tx.commit();
-
-        checkValue(key, val);
-
-        tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        Assert.assertArrayEquals(val, c.getAndRemove(key));
-
-        tx.commit();
-
-        checkValue(key, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPromote() throws Exception {
-        // TODO: GG-11148 check if test makes sense.
-        if (true)
-            return;
-
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        TestValue val = new TestValue(new byte[100 * 1024]);
-
-        List<Integer> keys = primaryKeys(c, 200);
-
-        for (Integer key : keys)
-            c.put(key, val);
-
-        c.localPromote(new HashSet<>(keys));
-
-        for (Integer key : keys) {
-            TestValue val0 = c.get(key);
-
-            Assert.assertArrayEquals(val.val, val0.val);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllGetAllRemoveAll() throws Exception {
-        Map<Integer, Integer> map = new HashMap<>();
-
-        for (int i = 0; i < 100; i++)
-            map.put(i, i);
-
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Map<Integer, Integer> map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        c.putAll(map);
-
-        map0 = c.getAll(map.keySet());
-
-        assertEquals(map, map0);
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), e.getValue());
-
-        c.invokeAll(map.keySet(), new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                e.setValue(val + 1);
-
-                return null;
-            }
-        });
-
-        map0 = c.getAll(map.keySet());
-
-        for (Map.Entry<Integer, Integer> e : map0.entrySet())
-            assertEquals((Integer)(e.getKey() + 1), e.getValue());
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), e.getValue() + 1);
-
-        c.removeAll(map.keySet());
-
-        map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutAllGetAllRemoveAllTx(PESSIMISTIC);
-
-            checkPutAllGetAllRemoveAllTx(OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutAllGetAllRemoveAllTx(TransactionConcurrency txConcurrency) throws Exception {
-        Map<Integer, Integer> map = new HashMap<>();
-
-        for (int i = 0; i < 100; i++)
-            map.put(i, i);
-
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Map<Integer, Integer> map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        try (Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ)) {
-            c.putAll(map);
-
-            tx.commit();
-        }
-
-        map0 = c.getAll(map.keySet());
-
-        assertEquals(map, map0);
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), e.getValue());
-
-        try (Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ)) {
-            c.removeAll(map.keySet());
-
-            tx.commit();
-        }
-
-        map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemoveObject() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkPutGetRemoveObject(primaryKey(c));
-
-        checkPutGetRemoveObject(backupKey(c));
-
-        checkPutGetRemoveObject(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveObject(Integer key) throws Exception {
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        checkValue(key, null);
-
-        TestValue val = new TestValue(new byte[10]);
-
-        assertNull(c.getAndPut(key, val));
-
-        checkValue(key, val);
-
-        TestValue val2 = new TestValue(new byte[10]);
-
-        if (binaryEnabled()) // TODO: IGNITE-608, check return value when fixed.
-            c.put(key, val);
-        else
-            assertEquals(val, c.getAndPut(key, val));
-
-        checkValue(key, val2);
-
-        if (binaryEnabled()) // TODO: IGNITE-608, check return value when fixed.
-            c.remove(key);
-        else
-            assertEquals(val2, c.getAndRemove(key));
-
-        checkValue(key, null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutGetRemoveTx(key, PESSIMISTIC);
-
-            checkPutGetRemoveTx(key, OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param key Key,
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveObjectTx(Integer key, TransactionConcurrency txConcurrency) throws Exception {
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        TestValue val = new TestValue(new byte[10]);
-
-        Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertNull(c.getAndPut(key, val));
-
-        tx.commit();
-
-        checkValue(key, val);
-
-        tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertEquals(val, c.getAndRemove(key));
-
-        tx.commit();
-
-        checkValue(key, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testLockUnlock() throws Exception {
-        if (atomicityMode() == ATOMIC)
-            return;
-
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        checkLockUnlock(primaryKey(c));
-
-        checkLockUnlock(backupKey(c));
-
-        checkLockUnlock(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("UnnecessaryLocalVariable")
-    private void checkLockUnlock(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Integer val = key;
-
-        c.put(key, val);
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        Lock lock = c.lock(key);
-
-        lock.lock();
-
-        assertTrue(c.isLocalLocked(key, false));
-
-        lock.unlock();
-
-        assertFalse(c.isLocalLocked(key, false));
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        checkValue(key, val);
-    }
-
-    /**
-     * @param key Key.
-     * @param val Value.
-     * @throws Exception If failed.
-     */
-    private void checkValue(Object key, @Nullable Object val) throws Exception {
-        for (int i = 0; i < gridCount(); i++) {
-            if (val != null && val.getClass() == byte[].class) {
-                Assert.assertArrayEquals("Unexpected value for grid: " + i,
-                    (byte[])val,
-                    (byte[])grid(i).cache(null).get(key));
-            }
-            else
-                assertEquals("Unexpected value for grid: " + i, val, grid(i).cache(null).get(key));
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testUnswap() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkUnswap(primaryKey(c));
-
-        checkUnswap(backupKey(c));
-
-        checkUnswap(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkUnswap(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        for (int i = 0; i < gridCount(); i++) {
-            assertEquals("Unexpected entries for grid: " + i, 0, grid(i).cache(null).localSize(CachePeekMode.OFFHEAP));
-
-            assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
-        }
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        c.put(key, key);
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        assertEquals(key, c.get(key));
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        assertTrue(c.remove(key));
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        for (int i = 0; i < gridCount(); i++) {
-            assertEquals("Unexpected entries for grid: " + i, 0, grid(i).cache(null).localSize(CachePeekMode.OFFHEAP));
-
-            assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class TestEntryPredicate implements IgnitePredicate<Cache.Entry<Integer, Integer>> {
-        /** */
-        private Integer expVal;
-
-        /**
-         * @param expVal Expected value.
-         */
-        TestEntryPredicate(Integer expVal) {
-            this.expVal = expVal;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean apply(Cache.Entry<Integer, Integer> e) {
-            assertEquals(expVal, e.getValue());
-
-            return true;
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class TestValue {
-        /** */
-        @SuppressWarnings("PublicField")
-        public byte[] val;
-
-        /**
-         * Default constructor.
-         */
-        public TestValue() {
-            // No-op.
-        }
-
-        /**
-         * @param val Value.
-         */
-        public TestValue(byte[] val) {
-            this.val = val;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            if (this == o)
-                return true;
-
-            if (o == null || getClass() != o.getClass())
-                return false;
-
-            TestValue other = (TestValue)o;
-
-            return Arrays.equals(val, other.val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return Arrays.hashCode(val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "TestValue{" +
-                "val=" + Arrays.toString(val) +
-                '}';
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
deleted file mode 100644
index f296929..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredAtomicSelfTest extends GridCacheOffHeapTieredAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
deleted file mode 100644
index be6e59a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
+++ /dev/null
@@ -1,364 +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.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import javax.cache.Cache;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests that offheap entry is not evicted while cache entry is in use.
- */
-public abstract class GridCacheOffHeapTieredEvictionAbstractSelfTest extends GridCacheAbstractSelfTest {
-    /** */
-    private static final int VALS = 100;
-
-    /** */
-    private static final int VAL_SIZE = 128;
-
-    /** */
-    private static final int KEYS = 100;
-
-    /** */
-    private List<TestValue> vals = new ArrayList<>(VALS);
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        return 120 * 1000;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAtomicWriteOrderMode(PRIMARY);
-
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setNearConfiguration(null);
-        ccfg.setOffHeapMaxMemory(0);
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        super.beforeTest();
-
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
-        vals = new ArrayList<>(VALS);
-
-        for (int i = 0; i < VALS; i++) {
-            SB sb = new SB(VAL_SIZE);
-
-            char c = Character.forDigit(i, 10);
-
-            for (int j = 0; j < VAL_SIZE; j++)
-                sb.a(c);
-
-            vals.add(new TestValue(sb.toString()));
-        }
-
-        for (int i = 0; i < KEYS; i++)
-            cache.put(i, vals.get(i % vals.size()));
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        super.afterTest();
-
-        vals = null;
-    }
-
-    /**
-     * @return Number of iterations per thread.
-     */
-    private int iterations() {
-        return atomicityMode() == ATOMIC ? 100_000 : 50_000;
-    }
-
-
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPut() throws Exception {
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < iterations(); i++) {
-                    int key = rnd.nextInt(KEYS);
-
-                    final TestValue val = vals.get(key % VAL_SIZE);
-
-                    cache.put(key, val);
-
-                    if (i % 20_000 == 0 && i > 0)
-                        info("Done " + i + " out of " + iterations());
-                }
-
-                return null;
-            }
-        }, 16, "test");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRemove() throws Exception {
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < iterations(); i++) {
-                    int key = rnd.nextInt(KEYS);
-
-                    final TestValue val = vals.get(key % VAL_SIZE);
-
-                    if (rnd.nextBoolean())
-                        cache.remove(key);
-                    else
-                        cache.put(key, val);
-                }
-
-                return null;
-            }
-        }, 16, "test");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTransform() throws Exception {
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null).withKeepBinary();
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < iterations(); i++) {
-                    int key = rnd.nextInt(KEYS);
-
-                    final TestValue val = vals.get(key % VAL_SIZE);
-
-                    TestProcessor c = testClosure(val.val, false);
-
-                    cache.invoke(key, c);
-                }
-
-                return null;
-            }
-        }, 16, "test");
-    }
-
-    /**
-     * @param expVal Expected cache value.
-     * @param acceptNull If {@code true} value can be null;
-     * @return Predicate.
-     */
-    protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
-        return new TestValuePredicate(expVal, acceptNull);
-    }
-
-    /**
-     * @param expVal Expected cache value.
-     * @param acceptNull If {@code true} value can be null;
-     * @return Predicate.
-     */
-    protected TestProcessor testClosure(String expVal, boolean acceptNull) {
-        return new TestValueClosure(expVal, acceptNull);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class TestValue {
-        /** */
-        @SuppressWarnings("PublicField")
-        public String val;
-
-        /**
-         *
-         */
-        public TestValue() {
-            // No-op.
-        }
-
-        /**
-         * @param val Value.
-         */
-        public TestValue(String val) {
-            this.val = val;
-        }
-    }
-
-    /**
-     *
-     */
-    protected abstract static class TestPredicate implements P1<Cache.Entry<Integer, Object>> {
-        /** */
-        protected String expVal;
-
-        /** */
-        protected boolean acceptNull;
-
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        protected TestPredicate(String expVal, boolean acceptNull) {
-            this.expVal = expVal;
-            this.acceptNull = acceptNull;
-        }
-
-        /** {@inheritDoc} */
-        @Override public final boolean apply(Cache.Entry<Integer, Object> e) {
-            assertNotNull(e);
-
-            Object val = e.getValue();
-
-            if (val == null) {
-                if (!acceptNull)
-                    assertNotNull(val);
-
-                return true;
-            }
-
-            checkValue(val);
-
-            return true;
-        }
-
-        /**
-         * @param val Value.
-         */
-        public abstract void checkValue(Object val);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class TestValuePredicate extends TestPredicate {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        TestValuePredicate(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            TestValue obj = (TestValue)val;
-
-            assertEquals(expVal, obj.val);
-        }
-    }
-
-    /**
-     *
-     */
-    protected abstract static class TestProcessor implements EntryProcessor<Integer, Object, Void>, Serializable {
-        /** */
-        protected String expVal;
-
-        /** */
-        protected boolean acceptNull;
-
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        protected TestProcessor(String expVal, boolean acceptNull) {
-            this.expVal = expVal;
-            this.acceptNull = acceptNull;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Void process(MutableEntry<Integer, Object> e, Object... args) {
-            Object val = e.getValue();
-
-            if (val == null) {
-                if (!acceptNull)
-                    assertNotNull(val);
-
-                e.setValue(true);
-
-                return null;
-            }
-
-            checkValue(val);
-
-            e.setValue(val);
-
-            return null;
-        }
-
-        /**
-         * @param val Value.
-         */
-        public abstract void checkValue(Object val);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class TestValueClosure extends TestProcessor {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        TestValueClosure(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            TestValue obj = (TestValue)val;
-
-            assertEquals(expVal, obj.val);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
deleted file mode 100644
index 1e3c0c2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionAtomicSelfTest extends GridCacheOffHeapTieredEvictionAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
deleted file mode 100644
index d4e1df0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
+++ /dev/null
@@ -1,33 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- * Test with TRANSACTIONAL cache.
- */
-public class GridCacheOffHeapTieredEvictionSelfTest extends GridCacheOffHeapTieredEvictionAbstractSelfTest {
-    /** {@inheritDoc} */
-    @SuppressWarnings("RedundantMethodOverride")
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
deleted file mode 100644
index 67c27a9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
+++ /dev/null
@@ -1,33 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredSelfTest extends GridCacheOffHeapTieredAbstractSelfTest {
-    /** {@inheritDoc} */
-    @SuppressWarnings("RedundantMethodOverride")
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
index 4a6633b..2b82407 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -48,8 +47,6 @@ public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest {
         ccfg.setCacheMode(CacheMode.PARTITIONED);
         ccfg.setNearConfiguration(null);
         ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
-        ccfg.setOffHeapMaxMemory(0);
-        ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
 
         cfg.setCacheConfiguration(ccfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 fab05df..81f22d1 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
@@ -90,7 +90,6 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
         cc.setBackups(1);
         cc.setRebalanceMode(SYNC);
         cc.setWriteSynchronizationMode(FULL_SYNC);
-        cc.setEvictSynchronized(false);
         cc.setNearConfiguration(null);
 
         return cc;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
deleted file mode 100644
index 8f29158..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
+++ /dev/null
@@ -1,44 +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 org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class GridCachePartitionedOffHeapLocalStoreSelfTest extends GridCacheAbstractLocalStoreSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode getAtomicMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode getCacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean isOffHeapTieredMode() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index c46f6bf..82d9b41 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -81,10 +81,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
         partCacheCfg.setAffinity(new GridCacheModuloAffinityFunction(1, 1));
         partCacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         partCacheCfg.setNearConfiguration(null);
-        partCacheCfg.setEvictSynchronized(true);
         partCacheCfg.setEvictionPolicy(null);
-        partCacheCfg.setEvictSynchronizedKeyBufferSize(25);
-        partCacheCfg.setEvictMaxOverflowRatio(0.99f);
         partCacheCfg.setRebalanceMode(ASYNC);
         partCacheCfg.setAtomicityMode(TRANSACTIONAL);
 
@@ -199,8 +196,8 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
         assertTrue(GridTestUtils.waitForCondition(new PA() {
             @Override public boolean apply() {
-                int size1 = ignite1.cache(null).localSize(CachePeekMode.ALL);
-                return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ALL);
+                int size1 = ignite1.cache(null).localSize(CachePeekMode.ONHEAP);
+                return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ONHEAP);
             }
         }, getTestTimeout()));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
index d700856..2505c68 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
@@ -102,9 +102,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
     /** Backups count. */
     private int backups;
 
-    /** */
-    private GridTestUtils.TestMemoryMode memMode = GridTestUtils.TestMemoryMode.HEAP;
-
     /** Filter to include only worker nodes. */
     private static final IgnitePredicate<ClusterNode> workerNodesFilter = new PN() {
         @SuppressWarnings("unchecked")
@@ -206,60 +203,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
         checkPutAllFailoverColocated(false, 5, 2);
     }
 
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.SWAP;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedTwoBackupsSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.SWAP;
-
-        checkPutAllFailoverColocated(false, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTiered() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_TIERED;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTieredSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapEvict() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_EVICT;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapEvictSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
     /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
         return super.getTestTimeout() * 5;
@@ -748,7 +691,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
 
             cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
 
-            GridTestUtils.setMemoryMode(cfg, cacheCfg, memMode, 1000, 10 * 1024);
 
             cfg.setCacheConfiguration(cacheCfg);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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..50bed2a 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
@@ -21,6 +21,7 @@ import java.util.Collections;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
@@ -82,6 +83,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>() {
@@ -172,7 +174,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < N_ENTRIES; i++)
                 load(cache, i, true);
 
-            assertEquals(MAX_CACHE_ENTRIES, cache.size());
+            assertEquals(MAX_CACHE_ENTRIES, cache.size(CachePeekMode.ONHEAP));
         }
         finally {
             stopGrid();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 610392a..6979859 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -73,7 +73,6 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setCacheMode(cacheMode);
         cacheCfg.setRebalanceMode(SYNC);
-        cacheCfg.setEvictSynchronized(false);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
 
         if (cacheMode == PARTITIONED)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 8daf4ca..29ffe87 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
@@ -21,10 +21,9 @@ import java.util.concurrent.TimeUnit;
 import javax.cache.expiry.CreatedExpiryPolicy;
 import javax.cache.expiry.Duration;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -50,9 +49,6 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
     /** Cache mode. */
     private volatile CacheMode cacheMode;
 
-    /** Cache memory mode. */
-    private volatile CacheMemoryMode cacheMemoryMode;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -66,9 +62,9 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(cacheMemoryMode);
         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);
@@ -80,24 +76,21 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     public void testLocalEviction() throws Exception {
-        checkEviction(CacheMode.LOCAL, CacheMemoryMode.ONHEAP_TIERED);
-        checkEviction(CacheMode.LOCAL, CacheMemoryMode.OFFHEAP_TIERED);
+        checkEviction(CacheMode.LOCAL);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPartitionedEviction() throws Exception {
-        checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED);
-        checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED);
+        checkEviction(CacheMode.PARTITIONED);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplicatedEviction() throws Exception {
-        checkEviction(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED);
-        checkEviction(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED);
+        checkEviction(CacheMode.REPLICATED);
     }
 
     /**
@@ -105,9 +98,8 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     @SuppressWarnings("ConstantConditions")
-    private void checkEviction(CacheMode mode, CacheMemoryMode memoryMode) throws Exception {
+    private void checkEviction(CacheMode mode) throws Exception {
         cacheMode = mode;
-        cacheMemoryMode = memoryMode;
 
         final IgniteKernal g = (IgniteKernal)startGrid(0);
 
@@ -126,12 +118,12 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
             if (log.isTraceEnabled())
                 cctx.ttl().printMemoryStats();
 
-            final String firstKey = "Some test entry key#0";
+            final String firstKey = "Some test entry key#1";
             final String lastKey = "Some test entry key#" + ENTRIES_TO_PUT;
 
-            assertFalse("first key should be evicted", cache.containsKey(firstKey));
+            assertNull("first key should be evicted", cache.localPeek(firstKey, CachePeekMode.ONHEAP));
 
-            assertTrue("last key should NOT be evicted", cache.containsKey(lastKey));
+            assertNotNull("last key should NOT be evicted", cache.localPeek(lastKey, CachePeekMode.ONHEAP));
 
             assertEquals("Ttl Manager should NOT track evicted entries", ENTRIES_LIMIT, cctx.ttl().pendingSize());
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
index e95cb85..44adc84 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
@@ -18,17 +18,12 @@
 package org.apache.ignite.internal.processors.cache;
 
 import java.util.Arrays;
-import java.util.Collections;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -36,9 +31,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
  *
  */
 public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTest {
-    /** Memory mode. */
-    private CacheMemoryMode memMode;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -61,8 +53,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
         ccfg.setAtomicityMode(ATOMIC);
         ccfg.setNearConfiguration(null);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
-        ccfg.setMemoryMode(memMode);
-        ccfg.setOffHeapMaxMemory(1024 * 1024 * 1024);
         ccfg.setRebalanceMode(CacheRebalanceMode.SYNC);
 
         return ccfg;
@@ -72,40 +62,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testOnHeapTiered() throws Exception {
-        memMode = ONHEAP_TIERED;
-
-        startGrids(1);
-
-        try {
-            checkByteArrays();
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffHeapTiered() throws Exception {
-        memMode = OFFHEAP_TIERED;
-
-        startGrids(1);
-
-        try {
-            checkByteArrays();
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffHeapValuesOnly() throws Exception {
-        memMode = OFFHEAP_VALUES;
-
         startGrids(1);
 
         try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
index 4b1268a..a43e85b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
@@ -156,6 +156,8 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
         if (cacheMode() == PARTITIONED)
             cfg.setBackups(1);
 
+        cfg.setOnheapCacheEnabled(onheapCacheEnabled());
+
         return cfg;
     }
 
@@ -210,9 +212,9 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @return {@code true} if swap should be enabled.
+     * @return {@code True} if on-heap cache is enabled.
      */
-    protected boolean swapEnabled() {
+    protected boolean onheapCacheEnabled() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
index 3f9fc5c..1feafe4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
@@ -29,9 +29,4 @@ public class IgniteCacheAtomicPutAllFailoverSelfTest extends GridCachePutAllFail
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }
-
-    /** {@inheritDoc} */
-    @Override public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTieredSwap(){
-        fail("https://issues.apache.org/jira/browse/IGNITE-1584");
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
index 122e2ec..a9098e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
@@ -94,12 +94,10 @@ import org.jetbrains.annotations.Nullable;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CachePeekMode.ALL;
-import static org.apache.ignite.cache.CachePeekMode.BACKUP;
 import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
 import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
 import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
@@ -3214,7 +3212,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
      * @throws Exception If failed.
      */
     public void _testDeletedEntriesFlag() throws Exception {
-        if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) {
+        if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
             final int cnt = 3;
 
             IgniteCache<String, Integer> cache = jcache();
@@ -4231,9 +4229,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
         if (true)
             return;
 
-        if (memoryMode() == OFFHEAP_TIERED)
-            return;
-
         int ttl = 1000;
 
         final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
@@ -4513,177 +4508,12 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testUnswap() throws Exception {
-        if (swapEnabled() && !offheapEnabled()) {
-            IgniteCache<String, Integer> cache = jcache();
-
-            List<String> keys = primaryKeysForCache(3);
-
-            String k1 = keys.get(0);
-            String k2 = keys.get(1);
-            String k3 = keys.get(2);
-
-            cache.getAndPut(k1, 1);
-            cache.getAndPut(k2, 2);
-            cache.getAndPut(k3, 3);
-
-            final AtomicInteger swapEvts = new AtomicInteger(0);
-            final AtomicInteger unswapEvts = new AtomicInteger(0);
-
-            Collection<String> locKeys = new HashSet<>();
-
-            if (grid(0).context().cache().cache(cacheName()).context().affinityNode()) {
-                Iterable<Cache.Entry<String, Integer>> entries = cache.localEntries(PRIMARY, BACKUP);
-
-                for (Cache.Entry<String, Integer> entry : entries)
-                    locKeys.add(entry.getKey());
-
-                info("Local keys (primary + backup): " + locKeys);
-            }
-
-            for (int i = 0; i < gridCount(); i++)
-                grid(i).events().localListen(
-                    new SwapEvtsLocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
-            cache.localEvict(F.asList(k2, k3));
-
-            if (memoryMode() == OFFHEAP_TIERED) {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-            else {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-
-            int cnt = 0;
-
-            if (locKeys.contains(k2) && swapEnabled()) {
-                assertNull(cache.localPeek(k2, ONHEAP));
-
-                cache.localPromote(Collections.singleton(k2));
-
-                assertEquals((Integer)2, cache.localPeek(k2, ONHEAP));
-
-                if (swapAfterLocalEvict())
-                    cnt++;
-            }
-            else {
-                cache.localPromote(Collections.singleton(k2));
-
-                assertNull(cache.localPeek(k2, ONHEAP));
-            }
-
-            if (locKeys.contains(k3) && swapEnabled()) {
-                assertNull(cache.localPeek(k3, ONHEAP));
-
-                cache.localPromote(Collections.singleton(k3));
-
-                assertEquals((Integer)3, cache.localPeek(k3, ONHEAP));
-
-                if (swapAfterLocalEvict())
-                    cnt++;
-            }
-            else {
-                cache.localPromote(Collections.singleton(k3));
-
-                assertNull(cache.localPeek(k3, ONHEAP));
-            }
-
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-
-            cache.localEvict(Collections.singleton(k1));
-
-            assertEquals((Integer)1, cache.get(k1));
-
-            if (locKeys.contains(k1) && swapAfterLocalEvict())
-                cnt++;
-
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-
-            cache.clear();
-
-            // Check with multiple arguments.
-            cache.getAndPut(k1, 1);
-            cache.getAndPut(k2, 2);
-            cache.getAndPut(k3, 3);
-
-            swapEvts.set(0);
-            unswapEvts.set(0);
-
-            cache.localEvict(Collections.singleton(k2));
-            cache.localEvict(Collections.singleton(k3));
-
-            if (memoryMode() == OFFHEAP_TIERED) {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-            else {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-
-            cache.localPromote(F.asSet(k2, k3));
-
-            cnt = 0;
-
-            if (locKeys.contains(k2) && swapAfterLocalEvict())
-                cnt++;
-
-            if (locKeys.contains(k3) && swapAfterLocalEvict())
-                cnt++;
-
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-        }
-    }
-
-    /**
-     * @param cache Cache.
-     * @param k Key,
-     */
-    private void checkKeyAfterPut(IgniteCache<String, Integer> cache, String k) {
-        if (memoryMode() == OFFHEAP_TIERED) {
-            assertNotNull(cache.localPeek(k, OFFHEAP));
-            assertNull(cache.localPeek(k, ONHEAP));
-        }
-        else {
-            assertNotNull(cache.localPeek(k, ONHEAP));
-            assertNull(cache.localPeek(k, OFFHEAP));
-        }
-    }
-
-    /**
      * @param cache Cache.
      * @param k Key.
      */
     private void checkKeyAfterLocalEvict(IgniteCache<String, Integer> cache, String k) {
-        switch (memoryMode()) {
-            case ONHEAP_TIERED:
-                assertNull(cache.localPeek(k, ONHEAP));
-                assertEquals(offheapEnabled(), cache.localPeek(k, OFFHEAP) != null);
-
-                break;
-            case OFFHEAP_TIERED:
-                assertNull(cache.localPeek(k, ONHEAP));
-                assertNotNull(cache.localPeek(k, OFFHEAP));
-
-                break;
-            case OFFHEAP_VALUES:
-                assertNull(cache.localPeek(k, ONHEAP, OFFHEAP));
-
-                break;
-            default:
-                fail("Unexpected memory mode: " + memoryMode());
-        }
+        assertNull(cache.localPeek(k, ONHEAP));
+        assertNotNull(cache.localPeek(k, OFFHEAP));
     }
 
     /**
@@ -4817,12 +4647,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
                     for (int i = 0; i < cnt; i++) {
                         boolean removed = cache.remove("key" + i);
 
-                        // TODO: delete the following check when IGNITE-2590 will be fixed.
-                        boolean bug2590 = cacheMode() == LOCAL && memoryMode() == OFFHEAP_TIERED
-                            && concurrency == OPTIMISTIC && isolation == REPEATABLE_READ;
-
-                        if (!bug2590)
-                            assertTrue(removed);
+                        assertTrue(removed);
                     }
                 }
             });
@@ -4900,9 +4725,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
     public void testToMap() throws Exception {
         IgniteCache<String, Integer> cache = jcache();
 
-        if (offheapTiered(cache))
-            return;
-
         cache.put("key1", 1);
         cache.put("key2", 2);
 
@@ -4921,9 +4743,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
      * @throws Exception If failed.
      */
     protected void checkSize(final Collection<String> keys) throws Exception {
-        if (memoryMode() == OFFHEAP_TIERED)
-            return;
-
         if (nearEnabled())
             assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
         else {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index dd27d72..e0e2771 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -58,7 +58,6 @@ import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -76,7 +75,6 @@ import static javax.cache.event.EventType.CREATED;
 import static javax.cache.event.EventType.EXPIRED;
 import static javax.cache.event.EventType.REMOVED;
 import static javax.cache.event.EventType.UPDATED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -116,8 +114,6 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
         cfg.setEagerTtl(eagerTtl());
 
-        cfg.setMemoryMode(memoryMode());
-
         return cfg;
     }
 
@@ -133,13 +129,6 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
         return cfg;
     }
 
-    /**
-     * @return Cache memory mode.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return ONHEAP_TIERED;
-    }
-
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         super.afterTest();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
deleted file mode 100644
index 69efb84..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerAtomicOffheapTieredTest extends IgniteCacheEntryListenerAtomicTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
deleted file mode 100644
index 23b1bc0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerAtomicOffheapValuesTest extends IgniteCacheEntryListenerAtomicTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
index f430b5b..b0be14e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
@@ -28,7 +28,6 @@ import javax.cache.expiry.Duration;
 import javax.cache.expiry.ModifiedExpiryPolicy;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -44,8 +43,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -86,28 +83,14 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac
      * @throws Exception If failed.
      */
     public void testExpiredEventAtomic() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testExpiredEventAtomicOffheap() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED));
+        checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testExpiredEventTx() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testExpiredEventTxOffheap() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED));
+        checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL));
     }
 
     /**
@@ -158,18 +141,15 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac
      *
      * @param cacheMode Cache mode.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @return Cache configuration.
      */
     private CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
deleted file mode 100644
index d552195..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerTxOffheapTieredTest extends IgniteCacheEntryListenerTxTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
deleted file mode 100644
index 32555c8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerTxOffheapValuesTest extends IgniteCacheEntryListenerTxTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}