http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java index c146525..f568689 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.affinity.GridAffinityFunctionContextImpl; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -42,6 +45,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Affinity API tests. */ +@RunWith(JUnit4.class) public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 4; @@ -85,6 +89,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testPartitions() throws Exception { assertEquals(affinity().partitions(), grid(0).affinity(DEFAULT_CACHE_NAME).partitions()); } @@ -94,6 +99,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testPartition() throws Exception { String key = "key"; @@ -105,6 +111,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testPrimaryPartitionsOneNode() throws Exception { AffinityFunctionContext ctx = new GridAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, @@ -134,6 +141,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testPrimaryPartitions() throws Exception { // Pick 2 nodes and create a projection over them. ClusterNode n0 = grid(0).localNode(); @@ -171,6 +179,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testBackupPartitions() throws Exception { // Pick 2 nodes and create a projection over them. ClusterNode n0 = grid(0).localNode(); @@ -206,6 +215,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testAllPartitions() throws Exception { // Pick 2 nodes and create a projection over them. ClusterNode n0 = grid(0).localNode(); @@ -234,6 +244,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMapPartitionToNode() throws Exception { int part = RND.nextInt(affinity().partitions()); @@ -253,6 +264,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMapPartitionsToNode() throws Exception { Map<Integer, ClusterNode> map = grid(0).affinity(DEFAULT_CACHE_NAME).mapPartitionsToNodes(F.asList(0, 1, 5, 19, 12)); @@ -273,6 +285,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMapPartitionsToNodeArray() throws Exception { Map<Integer, ClusterNode> map = grid(0).affinity(DEFAULT_CACHE_NAME).mapPartitionsToNodes(F.asList(0, 1, 5, 19, 12)); @@ -293,6 +306,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMapPartitionsToNodeCollection() throws Exception { Collection<Integer> parts = new LinkedList<>(); @@ -337,6 +351,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testPartitionWithAffinityMapper() throws Exception { AffinityKey<Integer> key = new AffinityKey<>(1, 2); @@ -345,4 +360,4 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { for (int i = 0; i < gridCount(); i++) assertEquals(expPart, grid(i).affinity(DEFAULT_CACHE_NAME).partition(key)); } -} \ 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/GridCacheAffinityMapperSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java index 09fc296..272e3e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.cache.affinity.AffinityKeyMapper; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test affinity mapper. */ +@RunWith(JUnit4.class) public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -37,6 +41,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testMethodAffinityMapper() { AffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); @@ -63,6 +68,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testFieldAffinityMapper() { AffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); @@ -89,6 +95,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testFieldAffinityMapperWithWrongClass() { AffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); @@ -143,4 +150,4 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { return affKey; } } -} \ 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/GridCacheAffinityRoutingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java index ddb38e0..3f58221 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.GridTestUtils; 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.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Affinity routing tests. */ +@RunWith(JUnit4.class) public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; @@ -129,6 +133,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { for (int i = 0; i < KEY_CNT; i++) grid(0).compute().affinityRun(NON_DFLT_CACHE_NAME, i, new CheckRunnable(i, i)); @@ -137,6 +142,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityCallRestartFails() throws Exception { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -150,6 +156,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityCallRestart() throws Exception { assertEquals(MAX_FAILOVER_ATTEMPTS, grid(0).compute().affinityCall(NON_DFLT_CACHE_NAME, "key", @@ -159,6 +166,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityRunRestartFails() throws Exception { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -172,6 +180,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityRunRestart() throws Exception { grid(0).compute().affinityRun(NON_DFLT_CACHE_NAME, "key", new FailedRunnable("key", MAX_FAILOVER_ATTEMPTS)); } @@ -181,6 +190,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAffinityRunComplexKey() throws Exception { for (int i = 0; i < KEY_CNT; i++) { AffinityTestKey key = new AffinityTestKey(i); @@ -195,6 +205,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { for (int i = 0; i < KEY_CNT; i++) grid(0).compute().affinityCall(NON_DFLT_CACHE_NAME, i, new CheckCallable(i, i)); @@ -205,6 +216,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAffinityCallComplexKey() throws Exception { for (int i = 0; i < KEY_CNT; i++) { final AffinityTestKey key = new AffinityTestKey(i); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java index cebab2f..fad6806 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.util.GridAtomicInteger; import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.lang.IgniteFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that number of concurrent asynchronous operations is limited when configuration parameter is set. */ +@RunWith(JUnit4.class) public class GridCacheAsyncOperationsLimitSelfTest extends GridCacheAbstractSelfTest { /** */ public static final int MAX_CONCURRENT_ASYNC_OPS = 50; @@ -47,6 +51,7 @@ public class GridCacheAsyncOperationsLimitSelfTest extends GridCacheAbstractSelf /** * @throws Exception If failed. */ + @Test public void testAsyncOps() throws Exception { final AtomicInteger cnt = new AtomicInteger(); final GridAtomicInteger max = new GridAtomicInteger(); @@ -70,4 +75,4 @@ public class GridCacheAsyncOperationsLimitSelfTest extends GridCacheAbstractSelf assertTrue("Maximum number of permits exceeded: " + max.get(), max.get() <= 51); } } -} \ 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/GridCacheAtomicEntryProcessorDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java index f616b6e..7a7e781 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.config.GridTestProperties; 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.CacheMode.PARTITIONED; @@ -42,6 +45,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Cache EntryProcessor + Deployment. */ +@RunWith(JUnit4.class) public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -56,14 +60,12 @@ public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonA protected boolean clientMode; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { if (MvccFeatureChecker.forcedMvcc()) { assert atomicityMode() != ATOMIC; fail("https://issues.apache.org/jira/browse/IGNITE-10359"); } - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -130,6 +132,7 @@ public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonA /** * @throws Exception In case of error. */ + @Test public void testInvokeDeployment() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -139,6 +142,7 @@ public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonA /** * @throws Exception In case of error. */ + @Test public void testInvokeDeployment2() throws Exception { depMode = DeploymentMode.SHARED; @@ -148,6 +152,7 @@ public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonA /** * @throws Exception In case of error. */ + @Test public void testInvokeAllDeployment() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -157,6 +162,7 @@ public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonA /** * @throws Exception In case of error. */ + @Test public void testInvokeAllDeployment2() throws Exception { depMode = DeploymentMode.SHARED; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java index ca94c7f..a523a15 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java @@ -38,6 +38,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.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests messages being sent between nodes in ATOMIC mode. */ +@RunWith(JUnit4.class) public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -87,6 +91,7 @@ public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { checkMessages(false); } @@ -94,6 +99,7 @@ public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClient() throws Exception { checkMessages(true); } @@ -203,4 +209,4 @@ public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest cntMap.clear(); } } -} \ 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/GridCacheBasicApiAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java index 0b7de6e..03e8e68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.testframework.GridTestThread; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVTS_CACHE; @@ -51,6 +54,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED; * Test cases for multi-threaded tests. */ @SuppressWarnings("LockAcquiredButNotSafelyReleased") +@RunWith(JUnit4.class) public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTest { /** Grid. */ private Ignite ignite; @@ -89,6 +93,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe * * @throws Exception If test failed. */ + @Test public void testBasicLock() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -108,6 +113,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * @throws IgniteCheckedException If test failed. */ + @Test public void testSingleLockReentry() throws IgniteCheckedException { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -138,6 +144,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe * * @throws Exception If test failed. */ + @Test public void testReentry() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -179,6 +186,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * */ + @Test public void testInterruptLock() throws InterruptedException { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -225,6 +233,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * */ + @Test public void testInterruptLockWithTimeout() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -286,6 +295,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * @throws IgniteCheckedException If test failed. */ + @Test public void testManyLockReentries() throws IgniteCheckedException { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -331,6 +341,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testLockMultithreaded() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -451,6 +462,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe * * @throws Exception If error occur. */ + @Test public void testBasicOps() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -515,6 +527,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * @throws Exception If error occur. */ + @Test public void testBasicOpsWithReentry() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -590,6 +603,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testMultiLocks() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -623,6 +637,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe /** * @throws IgniteCheckedException If test failed. */ + @Test public void testGetPutRemove() throws IgniteCheckedException { IgniteCache<Integer, String> cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -647,6 +662,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe * * @throws Exception In case of error. */ + @Test public void testPutWithExpiration() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); @@ -726,4 +742,4 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe return true; } } -} \ 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/GridCacheBasicStoreAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java index 3ebb398..b48e58b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java @@ -37,6 +37,10 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Before; +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.CacheRebalanceMode.SYNC; @@ -47,6 +51,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Basic store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -55,6 +60,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -121,6 +127,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testNotExistingKeys() throws IgniteCheckedException { IgniteCache<Integer, String> cache = jcache(); Map<Integer, String> map = store.getMap(); @@ -145,6 +152,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test fails. */ + @Test public void testWriteThrough() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -216,6 +224,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test failed. */ + @Test public void testReadThrough() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -309,6 +318,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -339,6 +349,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test failed. */ + @Test public void testLoadCacheWithPredicate() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -376,6 +387,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test failed. */ + @Test public void testReloadCache() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -446,6 +458,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test failed. */ + @Test public void testReloadAll() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -509,6 +522,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract } /** @throws Exception If test failed. */ + @Test public void testReload() throws Exception { IgniteCache<Integer, String> cache = jcache(); @@ -594,4 +608,4 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract assert lastMtd.equals(mtd) : "Last method does not match [expected=" + mtd + ", lastMtd=" + lastMtd + ']'; } } -} \ 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/GridCacheBasicStoreMultithreadedAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java index 22b02dc..a65a0c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; 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.CacheWriteSynchronizationMode.FULL_SYNC; /** * Basic store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheBasicStoreMultithreadedAbstractTest extends GridCommonAbstractTest { /** Cache store. */ private CacheStore<Integer, Integer> store; @@ -90,6 +94,7 @@ public abstract class GridCacheBasicStoreMultithreadedAbstractTest extends GridC /** * @throws Exception If failed. */ + @Test public void testConcurrentGet() throws Exception { final AtomicInteger cntr = new AtomicInteger(); @@ -129,4 +134,4 @@ public abstract class GridCacheBasicStoreMultithreadedAbstractTest extends GridC assertEquals(1, cntr.get()); } -} \ 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/GridCacheClearAllSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java index 053345d..8217faa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java @@ -30,6 +30,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.PARTITIONED; @@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; * Test {@link IgniteCache#clear()} operation in multinode environment with nodes * having caches with different names. */ +@RunWith(JUnit4.class) public class GridCacheClearAllSelfTest extends GridCommonAbstractTest { /** Grid nodes count. */ private static final int GRID_CNT = 3; @@ -131,6 +135,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest { * * @throws Exception In case of exception. */ + @Test public void testGlobalClearAllPartitioned() throws Exception { cacheMode = PARTITIONED; @@ -144,6 +149,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest { * * @throws Exception In case of exception. */ + @Test public void testGlobalClearAllReplicated() throws Exception { cacheMode = REPLICATED; @@ -204,4 +210,4 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest { return F.eq(attrValue, clusterNode.attribute(TEST_ATTRIBUTE)); } } -} \ 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/GridCacheClearLocallySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java index 82c4659..c959612 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java @@ -32,6 +32,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.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.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -43,6 +46,7 @@ import static org.apache.ignite.internal.processors.cache.GridCacheAdapter.CLEAR /** * Test {@link IgniteCache#localClearAll(java.util.Set)} operations in multinode environment with nodes having caches with different names. */ +@RunWith(JUnit4.class) public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { /** Local cache. */ private static final String CACHE_LOCAL = "cache_local"; @@ -170,6 +174,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testLocalNoSplit() throws Exception { test(Mode.TEST_LOCAL, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -179,6 +184,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testLocalSplit() throws Exception { test(Mode.TEST_LOCAL, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -188,6 +194,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPartitionedNoSplit() throws Exception { test(Mode.TEST_PARTITIONED, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -197,6 +204,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPartitionedSplit() throws Exception { test(Mode.TEST_PARTITIONED, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -206,6 +214,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testColocatedNoSplit() throws Exception { test(Mode.TEST_COLOCATED, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -215,6 +224,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testColocatedSplit() throws Exception { test(Mode.TEST_COLOCATED, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -224,6 +234,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testReplicatedNoSplit() throws Exception { test(Mode.TEST_REPLICATED, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -233,6 +244,7 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testReplicatedSplit() throws Exception { test(Mode.TEST_REPLICATED, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -378,4 +390,4 @@ public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { return false; } } -} \ 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/GridCacheClearSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java index 81c4413..aaa30f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for cache clear. */ +@RunWith(JUnit4.class) public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -74,6 +78,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearPartitioned() throws Exception { testClear(CacheMode.PARTITIONED, false, null); } @@ -81,6 +86,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearPartitionedNear() throws Exception { testClear(CacheMode.PARTITIONED, true, null); } @@ -88,6 +94,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearReplicated() throws Exception { testClear(CacheMode.REPLICATED, false, null); } @@ -95,6 +102,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearReplicatedNear() throws Exception { testClear(CacheMode.REPLICATED, true, null); } @@ -102,6 +110,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeyPartitioned() throws Exception { testClear(CacheMode.PARTITIONED, false, Collections.singleton(3)); } @@ -109,6 +118,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeyPartitionedNear() throws Exception { testClear(CacheMode.PARTITIONED, true, Collections.singleton(3)); } @@ -116,6 +126,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeyReplicated() throws Exception { testClear(CacheMode.REPLICATED, false, Collections.singleton(3)); } @@ -123,6 +134,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeyReplicatedNear() throws Exception { testClear(CacheMode.REPLICATED, true, Collections.singleton(3)); } @@ -130,6 +142,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeysPartitioned() throws Exception { testClear(CacheMode.PARTITIONED, false, F.asSet(2, 6, 9)); } @@ -137,6 +150,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeysPartitionedNear() throws Exception { testClear(CacheMode.PARTITIONED, true, F.asSet(2, 6, 9)); } @@ -144,6 +158,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeysReplicated() throws Exception { testClear(CacheMode.REPLICATED, false, F.asSet(2, 6, 9)); } @@ -151,6 +166,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearKeysReplicatedNear() throws Exception { testClear(CacheMode.REPLICATED, true, F.asSet(2, 6, 9)); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java index 87c74bc..20c219c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; 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.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractTest{ /** Ip finder. */ private static final TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -50,6 +54,7 @@ public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractT /** * */ + @Test public void test() throws Exception { IgniteConfiguration node1cfg = getConfiguration("node1"); IgniteConfiguration node2cfg = getConfiguration("node2"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java index 4baa1c7..123d73c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java @@ -31,6 +31,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.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Grid cache concurrent hash map self test. */ +@RunWith(JUnit4.class) public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -75,6 +79,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRehash() throws Exception { IgniteCache<Integer, String> c = grid().cache(DEFAULT_CACHE_NAME); @@ -106,6 +111,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRehashRandom() throws Exception { IgniteCache<Integer, String> c = grid().cache(DEFAULT_CACHE_NAME); @@ -145,6 +151,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRehashMultithreaded1() throws Exception { final AtomicInteger tidGen = new AtomicInteger(); @@ -217,6 +224,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRehashMultithreaded2() throws Exception { final AtomicInteger tidGen = new AtomicInteger(0); @@ -310,6 +318,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEmptyWeakIterator() throws Exception { final IgniteCache<Integer, String> c = grid().cache(DEFAULT_CACHE_NAME); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java index 7fd608e..9f94ea8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java @@ -73,6 +73,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.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -83,6 +86,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentTxMultiNodeLoadTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -172,6 +176,7 @@ public class GridCacheConcurrentTxMultiNodeLoadTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testEvictions() throws Exception { try { cacheOn = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java index 99d46d3..d847be4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java @@ -30,6 +30,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.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Cache + conditional deployment test. */ +@RunWith(JUnit4.class) public class GridCacheConditionalDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -104,6 +108,7 @@ public class GridCacheConditionalDeploymentSelfTest extends GridCommonAbstractTe /** * @throws Exception In case of error. */ + @Test public void testNoDeploymentInfo() throws Exception { GridCacheIoManager ioMgr = cacheIoManager(); @@ -121,6 +126,7 @@ public class GridCacheConditionalDeploymentSelfTest extends GridCommonAbstractTe /** * @throws Exception In case of error. */ + @Test public void testAddedDeploymentInfo() throws Exception { GridCacheContext ctx = cacheContext(); @@ -144,6 +150,7 @@ public class GridCacheConditionalDeploymentSelfTest extends GridCommonAbstractTe /** * @throws Exception In case of error. */ + @Test public void testAddedDeploymentInfo2() throws Exception { GridCacheContext ctx = cacheContext(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java index 6ca7136..c825368 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; 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; @@ -66,6 +69,7 @@ import static org.apache.ignite.configuration.DeploymentMode.SHARED; * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstractTest { /** */ private boolean cacheEnabled; @@ -142,6 +146,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testCacheUtilsCheckAttributeMismatch() throws Exception { Ignite ignite = startGrid(1); @@ -189,6 +194,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testNullCacheMode() throws Exception { // Grid with null cache mode. // This is a legal case. The default cache mode should be used. @@ -203,6 +209,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testWithCacheAndWithoutCache() throws Exception { // 1st grid without cache. cacheEnabled = false; @@ -222,6 +229,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testSameCacheDifferentModes() throws Exception { // 1st grid with replicated cache. cacheEnabled = true; @@ -250,6 +258,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentCacheDifferentModes() throws Exception { // 1st grid with local cache. cacheEnabled = true; @@ -287,6 +296,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentDeploymentModes() throws Exception { // 1st grid with SHARED mode. cacheEnabled = true; @@ -312,6 +322,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentAffinities() throws Exception { cacheMode = PARTITIONED; @@ -336,6 +347,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentPreloadModes() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -358,6 +370,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionEnabled() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -380,6 +393,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionPolicyEnabled() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -402,6 +416,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionPolicies() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -426,6 +441,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionPolicyFactories() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -450,6 +466,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionFilters() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -472,6 +489,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentAffinityMappers() throws Exception { checkSecondGridStartFails( new C1<CacheConfiguration, Void>() { @@ -494,6 +512,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentAtomicity() throws Exception { cacheMode = PARTITIONED; @@ -520,6 +539,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentTxAtomicity() throws Exception { cacheMode = PARTITIONED; @@ -546,6 +566,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentSynchronization() throws Exception { cacheMode = PARTITIONED; @@ -570,6 +591,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testAffinityFunctionConsistency() throws Exception { cacheEnabled = true; cacheMode = PARTITIONED; @@ -616,6 +638,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testAttributesWarnings() throws Exception { cacheEnabled = true; @@ -651,6 +674,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testPartitionedOnlyAttributesIgnoredForReplicated() throws Exception { cacheEnabled = true; @@ -690,6 +714,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testIgnoreMismatchForLocalCaches() throws Exception { cacheEnabled = true; @@ -737,6 +762,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testStoreCheckAtomic() throws Exception { cacheEnabled = true; @@ -782,6 +808,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testStoreCheckTransactional() throws Exception { cacheEnabled = true; @@ -829,6 +856,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testAffinityForReplicatedCache() throws Exception { cacheEnabled = true; @@ -849,6 +877,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testDifferentInterceptors() throws Exception { cacheMode = PARTITIONED; @@ -933,4 +962,4 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac private static class TestCacheDefaultAffinityKeyMapper extends GridCacheDefaultAffinityKeyMapper { // No-op, just different class. } -} \ 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/GridCacheConfigurationValidationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java index 7b793b7..6649ece 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java @@ -25,6 +25,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.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -35,6 +38,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Attribute validation self test. */ +@RunWith(JUnit4.class) public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstractTest { /** */ private static final String NON_DFLT_CACHE_NAME = "non-dflt-cache"; @@ -138,6 +142,7 @@ public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstract * * @throws Exception If failed. */ + @Test public void testDuplicateCacheConfigurations() throws Exception { // This grid should not start. startInvalidGrid(DUP_CACHES_IGNITE_INSTANCE_NAME); @@ -149,6 +154,7 @@ public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstract /** * @throws Exception If fails. */ + @Test public void testCacheAttributesValidation() throws Exception { try { startGrid(0); @@ -215,4 +221,4 @@ public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstract private static class TestCacheDefaultAffinityKeyMapper extends GridCacheDefaultAffinityKeyMapper { // No-op. Just to have another class name. } -} \ 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/GridCacheDaemonNodeAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java index 8077251..c35ce5e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; 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.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -41,6 +44,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Test cache operations with daemon node. */ +@RunWith(JUnit4.class) public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -90,6 +94,7 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testImplicit() throws Exception { try { startGridsMultiThreaded(3); @@ -121,6 +126,7 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testExplicit() throws Exception { try { startGridsMultiThreaded(3); @@ -162,6 +168,7 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testMapKeyToNode() throws Exception { try { // Start normal nodes. http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java index ff3ab36..f3aa2c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java @@ -34,6 +34,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.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ import static org.apache.ignite.configuration.DeploymentMode.SHARED; /** * Cache + Deployment test. */ +@RunWith(JUnit4.class) public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -124,6 +128,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment() throws Exception { try { depMode = CONTINUOUS; @@ -150,6 +155,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment2() throws Exception { try { depMode = CONTINUOUS; @@ -185,6 +191,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment3() throws Exception { try { depMode = SHARED; @@ -231,12 +238,14 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment4() throws Exception { doDeployment4(false); } /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment4BackupLeavesGrid() throws Exception { doDeployment4(true); } @@ -288,6 +297,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment5() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -345,6 +355,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment6() throws Exception { try { depMode = SHARED; @@ -378,6 +389,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment7() throws Exception { try { depMode = SHARED; @@ -410,6 +422,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testPartitionedDeploymentPreloading() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -434,6 +447,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheUndeploymentSharedMode() throws Exception { testCacheUndeployment(SHARED); } @@ -441,6 +455,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheUndeploymentContMode() throws Exception { testCacheUndeployment(CONTINUOUS); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java index 98928b0..9f287cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java @@ -40,6 +40,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; @@ -49,6 +52,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * */ +@RunWith(JUnit4.class) public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -191,6 +195,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -216,6 +221,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { IgniteCache<Integer, Value> cache = createCache(false, REPLICATED); @@ -239,6 +245,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabled() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -293,6 +300,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabled() throws Exception { IgniteCache<Integer, Value> cache = createCache(false, PARTITIONED); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java index 8a4196b..9185940 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java @@ -28,6 +28,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; @@ -39,6 +42,7 @@ import static org.apache.ignite.internal.processors.cache.version.GridCacheVersi /** * */ +@RunWith(JUnit4.class) public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -71,6 +75,7 @@ public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionAtomic() throws Exception { atomicityMode = ATOMIC; @@ -80,6 +85,7 @@ public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionTransactional() throws Exception { atomicityMode = TRANSACTIONAL; @@ -89,6 +95,7 @@ public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionMvccTx() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; @@ -165,4 +172,4 @@ public class GridCacheEntryVersionSelfTest 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/GridCacheEvictionEventAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java index b2c87a9..6d83a07 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java @@ -37,6 +37,10 @@ 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.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED; import static org.apache.ignite.events.EventType.EVT_JOB_MAPPED; @@ -46,11 +50,13 @@ import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED; /** * Eviction event self test. */ +@RunWith(JUnit4.class) public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -102,6 +108,7 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testEvictionEvent() throws Exception { Ignite g = grid(); @@ -129,4 +136,4 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr assertTrue("Failed to wait for eviction event", latch.await(10, TimeUnit.SECONDS)); } -} \ 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/GridCacheFinishPartitionsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java index d60e4c6..2d70e54 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; 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.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Abstract class for cache tests. */ +@RunWith(JUnit4.class) public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 1; @@ -93,6 +97,7 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testTxFinishPartitions() throws Exception { String key = "key"; String val = "value"; @@ -175,6 +180,7 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testMvccFinishPartitions() throws Exception { String key = "key"; @@ -201,6 +207,7 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testMvccFinishKeys() throws Exception { IgniteCache<String, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -234,6 +241,7 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testMvccFinishPartitionsContinuousLockAcquireRelease() throws Exception { int key = 1; @@ -338,4 +346,4 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest return end.get() - start; } -} \ 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/GridCacheFullTextQueryMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java index 90f8d60..b993948 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.processors.cache.query.CacheQuery; import org.apache.ignite.internal.processors.cache.query.CacheQueryFuture; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.S; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -35,6 +38,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Multithreaded reduce query tests with lots of data. */ +@RunWith(JUnit4.class) public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 3; @@ -69,6 +73,7 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra * @throws Exception In case of error. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testH2Text() throws Exception { int duration = 20 * 1000; final int keyCnt = 5000; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index af9751f..b32f7d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -34,6 +34,10 @@ 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.Before; +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.CacheRebalanceMode.SYNC; @@ -42,6 +46,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Basic get and transform store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -50,6 +55,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -116,6 +122,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testGetAndTransform() throws Exception { final AtomicBoolean finish = new AtomicBoolean(); @@ -173,4 +180,4 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm return null; } } -} \ 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/GridCacheIncrementTransformTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java index 33b094f..2abd4e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.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.GridTestUtils; 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.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests cache in-place modification logic with iterative value increment. */ +@RunWith(JUnit4.class) public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -102,6 +106,7 @@ public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIncrement() throws Exception { testIncrement(false); } @@ -109,6 +114,7 @@ public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIncrementRestart() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); final AtomicReference<Throwable> error = new AtomicReference<>(); @@ -230,4 +236,4 @@ public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { return null; } } -} \ No newline at end of file +}
