http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java index 5c74042..47a6910 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -64,6 +67,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Base class for eviction tests. */ +@RunWith(JUnit4.class) public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy<?, ?>> extends GridCommonAbstractTest { /** IP finder. */ @@ -161,6 +165,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizePolicy() throws Exception { plcMax = 3; plcMaxMemSize = 0; @@ -172,6 +177,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizePolicyWithBatch() throws Exception { plcMax = 3; plcMaxMemSize = 0; @@ -183,6 +189,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxMemSizePolicy() throws Exception { plcMax = 0; plcMaxMemSize = 3 * MockEntry.ENTRY_SIZE; @@ -196,6 +203,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy * * @throws Exception If failed. */ + @Test public void testMaxMemSizePolicyWithBatch() throws Exception { plcMax = 3; plcMaxMemSize = 10 * MockEntry.ENTRY_SIZE; @@ -207,6 +215,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizeMemory() throws Exception { int max = 10; @@ -220,6 +229,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizeMemoryWithBatch() throws Exception { int max = 10; @@ -233,6 +243,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeMemory() throws Exception { int max = 10; @@ -246,6 +257,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizeRandom() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -257,6 +269,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizeRandomWithBatch() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -268,6 +281,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeRandom() throws Exception { plcMax = 0; plcMaxMemSize = 10 * MockEntry.KEY_SIZE; @@ -279,6 +293,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizeAllowEmptyEntries() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -290,6 +305,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizeAllowEmptyEntriesWithBatch() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -301,6 +317,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeAllowEmptyEntries() throws Exception { plcMax = 0; plcMaxMemSize = 10 * MockEntry.KEY_SIZE; @@ -312,6 +329,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizePut() throws Exception { plcMax = 100; plcBatchSize = 1; @@ -323,6 +341,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxSizePutWithBatch() throws Exception { plcMax = 100; plcBatchSize = 2; @@ -334,6 +353,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy /** * @throws Exception If failed. */ + @Test public void testMaxMemSizePut() throws Exception { int max = 100; @@ -681,6 +701,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -693,6 +714,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -706,6 +728,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } /** @throws Exception If failed. */ + @Test public void testMaxMemSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -719,6 +742,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabled() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -732,6 +756,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -743,6 +768,7 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -1067,4 +1093,4 @@ public abstract class EvictionPolicyFactoryAbstractTest<T extends EvictionPolicy } } } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 6cbb043..3245af8 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 @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -113,6 +117,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyFifoLocalTwoKeys() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(1); @@ -128,6 +133,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyLruLocalTwoKeys() throws Exception { LruEvictionPolicy<Object, Object> plc = new LruEvictionPolicy<>(); plc.setMaxSize(1); @@ -143,6 +149,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencySortedLocalTwoKeys() throws Exception { SortedEvictionPolicy<Object, Object> plc = new SortedEvictionPolicy<>(); plc.setMaxSize(1); @@ -158,6 +165,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyFifoLocalFewKeys() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -172,6 +180,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyLruLocalFewKeys() throws Exception { LruEvictionPolicy<Object, Object> plc = new LruEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -186,6 +195,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencySortedLocalFewKeys() throws Exception { SortedEvictionPolicy<Object, Object> plc = new SortedEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -200,6 +210,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyFifoLocal() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -214,6 +225,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyLruLocal() throws Exception { LruEvictionPolicy<Object, Object> plc = new LruEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -228,6 +240,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencySortedLocal() throws Exception { SortedEvictionPolicy<Object, Object> plc = new SortedEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -359,4 +372,4 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb return Collections.emptyList(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 6cffe0c..4d31c7c 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 @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -46,6 +49,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -108,6 +112,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentPutsFifoLocal() throws Exception { mode = LOCAL; @@ -124,6 +129,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentPutsLruLocal() throws Exception { mode = LOCAL; @@ -140,6 +146,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentPutsSortedLocal() throws Exception { mode = LOCAL; @@ -210,4 +217,4 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest stopAllGrids(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 a04807a..5588f2f 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 @@ -40,12 +40,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Tests that cache handles {@code setAllowEmptyEntries} flag correctly. */ +@RunWith(JUnit4.class) public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -122,6 +126,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb * * @throws Exception If failed. */ + @Test public void testFifo() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy(); plc.setMaxSize(50); @@ -311,4 +316,4 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb } } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java index c9cc00a..f75f925 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java @@ -20,10 +20,14 @@ package org.apache.ignite.internal.processors.cache.eviction; import org.apache.ignite.Ignite; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheEmptyEntriesLocalSelfTest extends GridCacheEmptyEntriesAbstractSelfTest { /** {@inheritDoc} */ @Override protected Ignite startGrids() throws Exception { @@ -36,16 +40,15 @@ public class GridCacheEmptyEntriesLocalSelfTest extends GridCacheEmptyEntriesAbs } /** {@inheritDoc} */ + @Test @Override public void testFifo() throws Exception { super.testFifo(); } /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); - - super.beforeTestsStarted(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java index 5ed4843..586e9eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java @@ -20,10 +20,14 @@ package org.apache.ignite.internal.processors.cache.eviction; import org.apache.ignite.Ignite; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test allow empty entries flag on partitioned cache. */ +@RunWith(JUnit4.class) public class GridCacheEmptyEntriesPartitionedSelfTest extends GridCacheEmptyEntriesAbstractSelfTest { /** {@inheritDoc} */ @Override protected Ignite startGrids() throws Exception { @@ -36,14 +40,13 @@ public class GridCacheEmptyEntriesPartitionedSelfTest extends GridCacheEmptyEntr } /** {@inheritDoc} */ + @Test @Override public void testFifo() throws Exception { super.testFifo(); } /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 98c8b77..ec00f6e 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 @@ -26,14 +26,19 @@ import org.apache.ignite.cache.eviction.EvictableEntry; import org.apache.ignite.cache.eviction.EvictionPolicy; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for EvictableEntry.equals(). */ +@RunWith(JUnit4.class) public class GridCacheEvictableEntryEqualsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEquals() throws Exception { try (Ignite ignite = startGrid()) { CacheConfiguration<TestKey, String> cfg = new CacheConfiguration<>("test"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 71a6295..7996b05 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 @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -47,6 +50,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Base class for eviction tests. */ +@RunWith(JUnit4.class) public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -105,6 +109,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -114,6 +119,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { mode = REPLICATED; @@ -121,6 +127,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -131,6 +138,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -195,6 +203,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPartitionedMixed() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -261,4 +270,4 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { return cnts; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 b5265a3..f137e54 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 @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -46,6 +49,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED; /** * */ +@RunWith(JUnit4.class) public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -106,6 +110,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testLocal() throws Exception { mode = LOCAL; gridCnt = 1; @@ -114,6 +119,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { mode = REPLICATED; gridCnt = 3; @@ -122,6 +128,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { mode = PARTITIONED; gridCnt = 3; @@ -192,4 +199,4 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest entry.evict(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 384722e..3e2bc25 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 @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -52,6 +55,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -126,6 +130,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistency() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(500); @@ -181,6 +186,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictSingle() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(500); @@ -211,6 +217,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictAll() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(500); @@ -246,6 +253,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReload() throws Exception { FifoEvictionPolicy<Object, Object> plc = new FifoEvictionPolicy<>(); plc.setMaxSize(100); @@ -277,4 +285,4 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { stopAllGrids(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java index d53cb6f..17af3d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.cache.eviction.EvictableEntry; import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; import org.apache.ignite.cache.eviction.lru.LruEvictionPolicyFactory; import org.apache.ignite.internal.processors.cache.eviction.EvictionPolicyFactoryAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * LRU Eviction policy tests. */ +@RunWith(JUnit4.class) public class LruEvictionPolicyFactorySelfTest extends EvictionPolicyFactoryAbstractTest<LruEvictionPolicy<String, String>> { /** {@inheritDoc} */ @Override protected Factory<LruEvictionPolicy<String, String>> createPolicyFactory() { @@ -45,6 +49,7 @@ public class LruEvictionPolicyFactorySelfTest extends EvictionPolicyFactoryAbstr /** * @throws Exception If failed. */ + @Test public void testMiddleAccess() throws Exception { policyFactory = createPolicyFactory(); @@ -349,4 +354,4 @@ public class LruEvictionPolicyFactorySelfTest extends EvictionPolicyFactoryAbstr assertTrue(policy(i).queue().size() <= plcMax + plcBatchSize); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java index 3c53349..af29970 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java @@ -21,15 +21,20 @@ import org.apache.ignite.cache.eviction.EvictableEntry; import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; import org.apache.ignite.internal.processors.cache.CacheEvictableEntryImpl; import org.apache.ignite.internal.processors.cache.eviction.EvictionAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * LRU Eviction policy tests. */ +@RunWith(JUnit4.class) public class LruEvictionPolicySelfTest extends EvictionAbstractTest<LruEvictionPolicy<String, String>> { /** * @throws Exception If failed. */ + @Test public void testMiddleAccess() throws Exception { startGrid(); @@ -350,4 +355,4 @@ public class LruEvictionPolicySelfTest extends } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java index 8693d33..b063bcf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -40,6 +43,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC /** * LRU near eviction tests (GG-8884). */ +@RunWith(JUnit4.class) public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -87,6 +91,7 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAtomicNearEvictionMaxSize() throws Exception { atomicityMode = ATOMIC; @@ -96,6 +101,7 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTransactionalNearEvictionMaxSize() throws Exception { atomicityMode = TRANSACTIONAL; @@ -152,4 +158,4 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest { stopAllGrids(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java index 3977c2e..fea1298 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -41,6 +44,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC /** * LRU near eviction tests for NEAR_ONLY distribution mode (GG-8884). */ +@RunWith(JUnit4.class) public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testPartitionedAtomicNearEvictionMaxSize() throws Exception { atomicityMode = ATOMIC; cacheMode = PARTITIONED; @@ -105,6 +110,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testPartitionedTransactionalNearEvictionMaxSize() throws Exception { atomicityMode = TRANSACTIONAL; cacheMode = PARTITIONED; @@ -115,6 +121,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testPartitionedMvccTransactionalNearEvictionMaxSize() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -128,6 +135,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testReplicatedAtomicNearEvictionMaxSize() throws Exception { atomicityMode = ATOMIC; cacheMode = REPLICATED; @@ -138,6 +146,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testReplicatedTransactionalNearEvictionMaxSize() throws Exception { atomicityMode = TRANSACTIONAL; cacheMode = REPLICATED; @@ -148,6 +157,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testReplicatedMvccTransactionalNearEvictionMaxSize() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -201,4 +211,4 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes stopAllGrids(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java index 857c315..9af960f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.configuration.DataPageEvictionMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionMetricTest extends PageEvictionAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -43,6 +47,7 @@ public class PageEvictionMetricTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPageEvictionMetric() throws Exception { checkPageEvictionMetric(CacheAtomicityMode.ATOMIC); } @@ -50,6 +55,7 @@ public class PageEvictionMetricTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPageEvictionMetricMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java index d0d6f0b..49b54dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbstractTest { /** Cache modes. */ private static final CacheMode[] CACHE_MODES = {CacheMode.PARTITIONED, CacheMode.REPLICATED}; @@ -73,6 +77,7 @@ public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbst /** * @throws Exception If failed. */ + @Test public void testPageEviction() throws Exception { for (int i = 0; i < CACHE_MODES.length; i++) { for (int j = 0; j < ATOMICITY_MODES.length; j++) { @@ -91,6 +96,7 @@ public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbst /** * @throws Exception If failed. */ + @Test public void testPageEvictionMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java index 88db8fd..51c6405 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.configuration.DataPageEvictionMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.persistence.tree.reuse.ReuseList; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstractTest { /** Test timeout. */ private static final long TEST_TIMEOUT = 10 * 60 * 1000; @@ -57,6 +61,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingAtomicReplicated() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED); } @@ -64,6 +69,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingAtomicLocal() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL); } @@ -71,6 +77,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingTxReplicated() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED); } @@ -78,6 +85,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingTxLocal() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL); } @@ -85,6 +93,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); @@ -95,6 +104,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); @@ -104,6 +114,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7956"); fail("https://issues.apache.org/jira/browse/IGNITE-9530"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java index e17d2cc..67ae3f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.cache.store.CacheStoreAdapter; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataPageEvictionMode; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -42,6 +46,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughAtomicReplicated() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED); } @@ -49,6 +54,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughAtomicLocal() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL); } @@ -56,6 +62,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughTxReplicated() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED); } @@ -63,6 +70,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughTxLocal() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL); } @@ -70,6 +78,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -80,6 +89,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -90,6 +100,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7956"); fail("https://issues.apache.org/jira/browse/IGNITE-8582"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java index 68c39dd..59561b8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataPageEvictionMode; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** Test entries number. */ private static final int SAFE_ENTRIES = 1000; @@ -45,6 +49,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionAtomicReplicated() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED); } @@ -52,6 +57,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionAtomicLocal() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL); } @@ -59,6 +65,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionTxReplicated() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED); } @@ -66,6 +73,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionTxLocal() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL); } @@ -73,6 +81,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -83,6 +92,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -93,6 +103,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7956"); fail("https://issues.apache.org/jira/browse/IGNITE-9530"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java index 39e12cb..f52af6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java @@ -23,14 +23,19 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class PageEvictionWithRebalanceAbstractTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithRebalance() throws Exception { checkEvictionWithRebalance(CacheAtomicityMode.ATOMIC); } @@ -38,6 +43,7 @@ public abstract class PageEvictionWithRebalanceAbstractTest extends PageEviction /** * @throws Exception If failed. */ + @Test public void testEvictionWithRebalanceMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/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 39b01ed..554bbbe 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 @@ -30,10 +30,14 @@ 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.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link SortedEvictionPolicy} performance test. */ +@RunWith(JUnit4.class) public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest { /** Threads. */ private static final int THREADS = 8; @@ -87,6 +91,7 @@ public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest /** * Tests throughput. */ + @Test public void testThroughput() throws Exception { final LongAdder cnt = new LongAdder(); final AtomicBoolean finished = new AtomicBoolean(); @@ -128,4 +133,4 @@ public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest } }, THREADS); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java index 3417ba8..4ec23fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClientNearCacheExpiryTest extends IgniteCacheAbstractTest { /** */ private static final int NODES = 3; @@ -80,6 +84,7 @@ public class IgniteCacheClientNearCacheExpiryTest extends IgniteCacheAbstractTes /** * @throws Exception If failed. */ + @Test public void testExpirationOnClient() throws Exception { Ignite ignite = grid(NODES - 1); @@ -123,4 +128,4 @@ public class IgniteCacheClientNearCacheExpiryTest extends IgniteCacheAbstractTes for (int i = KEYS_COUNT ; i < KEYS_COUNT * 2; i++) assertNull(cache.localPeek(i)); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java index c04d9d8..9baba8e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java @@ -58,6 +58,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -70,6 +73,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbstractTest { /** */ private static final long TTL_FOR_EXPIRE = 500L; @@ -118,6 +122,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception if failed. */ + @Test public void testCreateUpdate0() throws Exception { startGrids(1); @@ -149,6 +154,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testZeroOnCreate() throws Exception { factory = CreatedExpiryPolicy.factoryOf(Duration.ZERO); @@ -176,6 +182,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testZeroOnUpdate() throws Exception { factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, 0L, null)); @@ -207,6 +214,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testZeroOnAccess() throws Exception { factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, null, 0L)); @@ -252,6 +260,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testZeroOnAccessEagerTtlDisabled() throws Exception { disableEagerTtl = true; @@ -277,6 +286,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testEternal() throws Exception { factory = EternalExpiryPolicy.factoryOf(); @@ -298,6 +308,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testNullFactory() throws Exception { factory = null; // Should work as eternal. @@ -349,6 +360,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testAccess() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-305"); @@ -595,6 +607,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testCreateUpdate() throws Exception { factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(60_000L, 61_000L, null)); @@ -835,6 +848,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testNearCreateUpdate() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -958,6 +972,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testNearAccess() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -1005,6 +1020,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs * * @throws Exception If failed. */ + @Test public void testNearExpiresOnClient() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -1042,6 +1058,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testNearExpiresWithCacheStore() throws Exception { if(cacheMode() != PARTITIONED) return; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java index 61d9b4c..4a1d120 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.cache.expiry; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.store.IgniteCacheExpiryStoreLoadSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerNotificationTest; @@ -29,39 +30,38 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheExpireAndUpdateCon public class IgniteCacheExpiryPolicyTestSuite extends TestSuite { /** * @return Cache Expiry Policy test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Expiry Policy Test Suite"); - suite.addTestSuite(IgniteCacheLargeValueExpireTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLargeValueExpireTest.class)); - suite.addTestSuite(IgniteCacheAtomicLocalExpiryPolicyTest.class); - //suite.addTestSuite(IgniteCacheAtomicLocalOnheapExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheAtomicExpiryPolicyTest.class); - //suite.addTestSuite(IgniteCacheAtomicOnheapExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheAtomicWithStoreExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheAtomicReplicatedExpiryPolicyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalExpiryPolicyTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalOnheapExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicExpiryPolicyTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicOnheapExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicWithStoreExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicReplicatedExpiryPolicyTest.class)); - suite.addTestSuite(IgniteCacheTxLocalExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheTxExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheTxWithStoreExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheTxReplicatedExpiryPolicyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxLocalExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxWithStoreExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxReplicatedExpiryPolicyTest.class)); - suite.addTestSuite(IgniteCacheAtomicExpiryPolicyWithStoreTest.class); - suite.addTestSuite(IgniteCacheTxExpiryPolicyWithStoreTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicExpiryPolicyWithStoreTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxExpiryPolicyWithStoreTest.class)); - suite.addTestSuite(IgniteCacheExpiryStoreLoadSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheExpiryStoreLoadSelfTest.class)); - suite.addTestSuite(IgniteCacheClientNearCacheExpiryTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheClientNearCacheExpiryTest.class)); - suite.addTestSuite(IgniteCacheEntryListenerExpiredEventsTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerExpiredEventsTest.class)); - suite.addTestSuite(IgniteCacheExpireAndUpdateConsistencyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheExpireAndUpdateConsistencyTest.class)); // Eager ttl expiration tests. - suite.addTestSuite(GridCacheTtlManagerNotificationTest.class); - suite.addTestSuite(IgniteCacheOnlyOneTtlCleanupThreadExistsTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheTtlManagerNotificationTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheOnlyOneTtlCleanupThreadExistsTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java index 747cb43..6a74b0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { @@ -72,6 +76,7 @@ public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends Ignit /** * @throws Exception If failed. */ + @Test public void testLoadAll() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); @@ -124,6 +129,7 @@ public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends Ignit /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); @@ -150,6 +156,7 @@ public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends Ignit /** * @throws Exception If failed. */ + @Test public void testReadThrough() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); @@ -182,6 +189,7 @@ public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends Ignit /** * @throws Exception If failed. */ + @Test public void testGetReadThrough() throws Exception { getReadThrough(false, null, null); getReadThrough(true, null, null); @@ -354,4 +362,4 @@ public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends Ignit }; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java index 7e0b1d7..f6c3147 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheLargeValueExpireTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public class IgniteCacheLargeValueExpireTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExpire() throws Exception { try (Ignite ignite = startGrid(0)) { checkExpire(ignite, true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java index f47de7d..0c2ef8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.Ignite; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that one and only one Ttl cleanup worker thread must exists, and only * if at least one cache with set 'eagerTtl' flag exists. */ +@RunWith(JUnit4.class) public class IgniteCacheOnlyOneTtlCleanupThreadExistsTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME1 = "cache-1"; @@ -36,6 +40,7 @@ public class IgniteCacheOnlyOneTtlCleanupThreadExistsTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testOnlyOneTtlCleanupThreadExists() throws Exception { try (final Ignite g = startGrid(0)) { checkCleanupThreadExists(false); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java index f5888f8..f795ec9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -28,6 +31,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPolicyWithStoreAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -45,6 +49,7 @@ public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPol } /** {@inheritDoc} */ + @Test @Override public void testGetReadThrough() throws Exception { super.testGetReadThrough(); @@ -62,4 +67,4 @@ public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPol getReadThrough(false, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); getReadThrough(true, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java index 3d9b7bd..185a1c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java @@ -35,11 +35,16 @@ import org.apache.ignite.cache.affinity.Affinity; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.apache.ignite.testframework.MvccFeatureChecker; /** * Test for {@link Cache#loadAll(Set, boolean, CompletionListener)}. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstractTest { /** */ private volatile boolean writeThrough = true; @@ -48,6 +53,7 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract private static ConcurrentHashMap<Object, Object> storeMap; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -85,6 +91,7 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract /** * @throws Exception If failed. */ + @Test public void testLoadAll() throws Exception { IgniteCache<Integer, String> cache0 = jcache(0); @@ -267,4 +274,4 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract }; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java index 5cdac5b..c36844a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.lifecycle.LifecycleAware; import org.apache.ignite.resources.IgniteInstanceResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbstractTest { /** */ private static AtomicInteger ldrCallCnt = new AtomicInteger(); @@ -81,6 +85,7 @@ public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testLoaderWriter() throws Exception { IgniteCache<Object, Object> cache = jcache(0); @@ -162,6 +167,7 @@ public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbs /** * */ + @Test public void testLoaderException() { IgniteCache<Object, Object> cache = jcache(0); @@ -180,6 +186,7 @@ public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbs /** * */ + @Test public void testWriterException() { IgniteCache<Object, Object> cache = jcache(0); @@ -198,6 +205,7 @@ public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testLoaderWriterBulk() throws Exception { Map<Object, Object> vals = new HashMap<>(); @@ -432,4 +440,4 @@ public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbs } } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java index 4eb6269..835d05e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Test for configuration property {@link CacheConfiguration#isLoadPreviousValue()}. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheNoLoadPreviousValueAbstractTest extends IgniteCacheAbstractTest { /** */ private Integer lastKey = 0; @@ -72,6 +76,7 @@ public abstract class IgniteCacheNoLoadPreviousValueAbstractTest extends IgniteC /** * @throws Exception If failed. */ + @Test public void testNoLoadPreviousValue() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); @@ -215,4 +220,4 @@ public abstract class IgniteCacheNoLoadPreviousValueAbstractTest extends IgniteC return keys; } -} \ No newline at end of file +}
