http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java index 6b3a863..db0be69 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.testframework.GridTestUtils; 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 org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_JOINED; /** * */ +@RunWith(JUnit4.class) public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest { /** */ private static final String VALUE = createValue(); @@ -101,6 +105,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testEvictions() throws Exception { try { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java index c15a0f8..644c620 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java @@ -62,6 +62,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.spi.failover.FailoverContext; import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; 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; @@ -71,6 +74,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests putAll() method along with failover and different configurations. */ +@RunWith(JUnit4.class) public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -134,6 +138,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearEnabledThreeBackups() throws Exception { checkPutAllFailoverColocated(true, 7, 3); } @@ -141,6 +146,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearDisabledThreeBackups() throws Exception { checkPutAllFailoverColocated(false, 7, 3); } @@ -148,6 +154,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearEnabledOneBackup() throws Exception { checkPutAllFailover(true, 3, 1); } @@ -155,6 +162,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearDisabledOneBackup() throws Exception { checkPutAllFailover(false, 3, 1); } @@ -162,6 +170,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearEnabledTwoBackups() throws Exception { checkPutAllFailover(true, 5, 2); } @@ -169,6 +178,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearDisabledTwoBackups() throws Exception { checkPutAllFailover(false, 5, 2); } @@ -176,6 +186,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearEnabledThreeBackups() throws Exception { checkPutAllFailover(true, 7, 3); } @@ -183,6 +194,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearDisabledThreeBackups() throws Exception { checkPutAllFailover(false, 7, 3); } @@ -190,6 +202,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearEnabledOneBackup() throws Exception { checkPutAllFailoverColocated(true, 3, 1); } @@ -197,6 +210,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearDisabledOneBackup() throws Exception { checkPutAllFailoverColocated(false, 3, 1); } @@ -204,6 +218,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearEnabledTwoBackups() throws Exception { checkPutAllFailoverColocated(true, 5, 2); } @@ -211,6 +226,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearDisabledTwoBackups() throws Exception { checkPutAllFailoverColocated(false, 5, 2); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java index 92a7084..fbbacd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.TextQuery; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -56,6 +60,7 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel /** * @throws IgniteCheckedException If failed. */ + @Test public void testSqlFieldsQuery() throws IgniteCheckedException { // Should not throw despite the cache not having QueryEntities. jcache().query(new SqlFieldsQuery("select * from dual")).getAll(); @@ -64,6 +69,7 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel /** * @throws IgniteCheckedException If failed. */ + @Test public void testTextQuery() throws IgniteCheckedException { doTest(new Callable<Object>() { @Override public Object call() throws IgniteCheckedException { @@ -75,6 +81,7 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel /** * @throws IgniteCheckedException If failed. */ + @Test public void testSqlQuery() throws IgniteCheckedException { // Failure occurs not on validation stage, hence specific error message. doTest(new Callable<Object>() { @@ -87,7 +94,8 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel /** * @throws IgniteCheckedException If failed. */ + @Test public void testScanQuery() throws IgniteCheckedException { jcache().query(new ScanQuery<>(null)).getAll(); } -} \ 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/GridCacheQueryInternalKeysSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java index 288e572..18d3719 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.P1; 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.SYNC; @@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Cache query internal keys self test. */ +@RunWith(JUnit4.class) public class GridCacheQueryInternalKeysSelfTest extends GridCacheAbstractSelfTest { /** Grid count. */ private static final int GRID_CNT = 2; @@ -68,6 +72,7 @@ public class GridCacheQueryInternalKeysSelfTest extends GridCacheAbstractSelfTes * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testInternalKeysPreloading() throws Exception { try { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -112,4 +117,4 @@ public class GridCacheQueryInternalKeysSelfTest extends GridCacheAbstractSelfTes } }); } -} \ 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/GridCacheQuerySqlFieldInlineSizeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java index f03e0c5..11ceef6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java @@ -26,15 +26,20 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; 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; /** * Tests cache configuration with inlineSize property of the QuerySqlField annotation. */ @SuppressWarnings({"unchecked", "unused"}) +@RunWith(JUnit4.class) public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleFieldIndexes() throws Exception { CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -57,6 +62,7 @@ public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testGroupIndex() throws Exception { CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -76,6 +82,7 @@ public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testGroupIndexInvalidAnnotaion() throws Exception { final CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -91,6 +98,7 @@ public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testNegativeInlineSize() throws Exception { final CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -157,4 +165,4 @@ public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstract @QuerySqlField(index = true, inlineSize = -10) String val; } -} \ 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/GridCacheReferenceCleanupSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java index 36dc3ac..dd1b8f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.testframework.GridTestUtils; 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.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.testframework.GridTestUtils.cacheContext; @@ -47,6 +50,7 @@ import static org.apache.ignite.testframework.GridTestUtils.cacheContext; /** * */ +@RunWith(JUnit4.class) public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -80,6 +84,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAtomicLongPartitioned() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10391"); @@ -97,6 +102,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAtomicLongReplicated() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10391"); @@ -114,6 +120,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAtomicLongLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -128,6 +135,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testOneAsyncOpPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -142,6 +150,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testOneAsyncOpReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -156,6 +165,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testOneAsyncOpLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -170,6 +180,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSeveralAsyncOpsPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -184,6 +195,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSeveralAsyncOpsReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -198,6 +210,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSeveralAsyncOpsLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -212,6 +225,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSyncOpAsyncCommitPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -226,6 +240,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSyncOpAsyncCommitReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -240,6 +255,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSyncOpAsyncCommitLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -254,6 +270,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAsyncOpsAsyncCommitPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -268,6 +285,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAsyncOpsAsyncCommitReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -282,6 +300,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAsyncOpsAsyncCommitLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -518,4 +537,4 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { this.i = 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/GridCacheReloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java index b960383..2006a47 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; 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.CacheMode.PARTITIONED; /** * Checks that CacheProjection.reload() operations are performed correctly. */ +@RunWith(JUnit4.class) public class GridCacheReloadSelfTest extends GridCommonAbstractTest { /** Maximum allowed number of cache entries. */ public static final int MAX_CACHE_ENTRIES = 500; @@ -66,6 +70,15 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION); + + if (nearEnabled) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + + /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { cacheMode = null; nearEnabled = true; @@ -130,6 +143,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionLocalCache() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -144,6 +158,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionPartitionedCacheNearEnabled() throws Exception { cacheMode = PARTITIONED; @@ -156,6 +171,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionPartitionedCacheNearDisabled() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -168,6 +184,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionReplicatedCache() throws Exception { cacheMode = CacheMode.REPLICATED; @@ -194,4 +211,4 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { stopGrid(); } } -} \ 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/GridCacheReplicatedSynchronousCommitTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java index deca296..801f4ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java @@ -40,12 +40,16 @@ 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.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test cases for preload tests. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstractTest { /** */ private static final int ADDITION_CACHE_NUMBER = 2; @@ -103,6 +107,7 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract /** * @throws Exception If test failed. */ + @Test public void testSynchronousCommit() throws Exception { try { Ignite firstIgnite = startGrid("1"); @@ -129,6 +134,7 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract /** * @throws Exception If test failed. */ + @Test public void testSynchronousCommitNodeLeave() throws Exception { try { Ignite ignite1 = startGrid("1"); @@ -202,4 +208,4 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract super.sendMessage(node, msg, ackClosure); } } -} \ 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/GridCacheReturnValueTransferSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java index 1b06e00..1ad3f4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; 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.PARTITIONED; /** * Tests transform for extra traffic. */ +@RunWith(JUnit4.class) public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest { /** Distribution mode. */ private boolean cache; @@ -76,6 +80,7 @@ public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest * @throws Exception If failed. * TODO IGNITE-581 enable when fixed. */ + @Test public void testTransformTransactionalNoBackups() throws Exception { // Test works too long and fails. fail("https://issues.apache.org/jira/browse/IGNITE-581"); @@ -87,6 +92,7 @@ public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest * @throws Exception If failed. * TODO IGNITE-581 enable when fixed. */ + @Test public void testTransformTransactionalOneBackup() throws Exception { // Test works too long and fails. fail("https://issues.apache.org/jira/browse/IGNITE-581"); @@ -179,4 +185,4 @@ public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest assert !failDeserialization; } } -} \ 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/GridCacheSlowTxWarnTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java index a37bbf3..c7e2d87 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java @@ -27,6 +27,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.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; * {@link org.apache.ignite.IgniteSystemProperties#IGNITE_SLOW_TX_WARN_TIMEOUT} * system property. */ +@RunWith(JUnit4.class) public class GridCacheSlowTxWarnTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -75,6 +79,7 @@ public class GridCacheSlowTxWarnTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWarningOutput() throws Exception { try { IgniteKernal g = (IgniteKernal)startGrid(1); @@ -147,4 +152,4 @@ public class GridCacheSlowTxWarnTest extends GridCommonAbstractTest { tx.close(); } } -} \ 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/GridCacheStopSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java index eed5fdb..b0fc2d4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +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; @@ -53,6 +56,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Tests correct cache stopping. */ +@RunWith(JUnit4.class) public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -94,6 +98,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopExplicitTransactions() throws Exception { atomicityMode = TRANSACTIONAL; @@ -103,6 +108,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopImplicitTransactions() throws Exception { atomicityMode = TRANSACTIONAL; @@ -112,6 +118,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopExplicitTransactionsReplicated() throws Exception { atomicityMode = TRANSACTIONAL; replicated = true; @@ -122,6 +129,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopImplicitTransactionsReplicated() throws Exception { atomicityMode = TRANSACTIONAL; replicated = true; @@ -132,6 +140,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopExplicitMvccTransactions() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; @@ -141,6 +150,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopImplicitMvccTransactions() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; @@ -150,6 +160,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopExplicitMvccTransactionsReplicated() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; replicated = true; @@ -160,6 +171,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopImplicitMvccTransactionsReplicated() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; replicated = true; @@ -170,6 +182,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopAtomic() throws Exception { atomicityMode = ATOMIC; @@ -179,6 +192,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopMultithreaded() throws Exception { try { startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index 124e284..e12675c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -44,6 +44,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.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -57,6 +61,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; * https://issues.apache.org/jira/browse/IGNITE-2753 * </a> */ +@RunWith(JUnit4.class) public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstractTest { /** IP finder. */ protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -68,6 +73,7 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract protected static final String CACHE_NAME = "cache_name"; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -151,6 +157,7 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract * * @throws Exception If failed. */ + @Test public void testStream() throws Exception { final Ignite grid = startGrid(); @@ -176,6 +183,7 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract * * @throws Exception If failed. */ + @Test public void testPartitionMove() throws Exception { final Ignite grid = startGrid("binaryGrid1"); @@ -214,6 +222,7 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract * * @throws Exception If failed. */ + @Test public void testBinaryStream() throws Exception { final Ignite grid = startGrid("binaryGrid"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java index 237ae72..2d6c30d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java @@ -26,6 +26,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.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -33,6 +36,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test for {@link CacheConfiguration#isStoreKeepBinary()}. */ +@RunWith(JUnit4.class) public class GridCacheStoreValueBytesSelfTest extends GridCommonAbstractTest { /** */ private boolean storeValBytes; @@ -74,6 +78,7 @@ public class GridCacheStoreValueBytesSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testEnabled() throws Exception { storeValBytes = true; @@ -92,4 +97,4 @@ public class GridCacheStoreValueBytesSelfTest extends GridCommonAbstractTest { assert entry.valueBytes() != 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/GridCacheSwapPreloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java index 261411f..ee980bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java @@ -36,6 +36,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.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.PARTITIONED; @@ -46,6 +49,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test for cache swap preloading. */ +@RunWith(JUnit4.class) public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { /** Entry count. */ private static final int ENTRY_CNT = 15_000; @@ -84,6 +88,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSwapReplicated() throws Exception { cacheMode = REPLICATED; @@ -91,6 +96,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSwapPartitioned() throws Exception { cacheMode = PARTITIONED; @@ -142,6 +148,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSwapReplicatedMultithreaded() throws Exception { cacheMode = REPLICATED; @@ -149,6 +156,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSwapPartitionedMultithreaded() throws Exception { cacheMode = PARTITIONED; @@ -242,4 +250,4 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { } } } -} \ 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/GridCacheTcpClientDiscoveryMultiThreadedTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java index 8a2f5d5..0bb3cd5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests {@link TcpDiscoverySpi} in client mode with multiple client nodes that interact with a cache concurrently. */ +@RunWith(JUnit4.class) public class GridCacheTcpClientDiscoveryMultiThreadedTest extends GridCacheAbstractSelfTest { /** Server nodes count. */ private static int srvNodesCnt; @@ -104,6 +108,7 @@ public class GridCacheTcpClientDiscoveryMultiThreadedTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testCacheConcurrentlyWithMultipleClientNodes() throws Exception { srvNodesCnt = 2; clientNodesCnt = 3; @@ -190,4 +195,4 @@ public class GridCacheTcpClientDiscoveryMultiThreadedTest extends GridCacheAbstr for (int i = 100; i < 200; i++) assertEquals(i, (int) cache.get(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/GridCacheTransactionalAbstractMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java index c445879..e3d9a5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionMetrics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -37,6 +40,7 @@ import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK; /** * Transactional cache metrics test. */ +@RunWith(JUnit4.class) public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends GridCacheAbstractMetricsSelfTest { /** */ private static final int TX_CNT = 3; @@ -47,6 +51,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedCommits() throws Exception { testCommits(OPTIMISTIC, READ_COMMITTED, true); } @@ -54,6 +59,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedCommitsNoData() throws Exception { testCommits(OPTIMISTIC, READ_COMMITTED, false); } @@ -61,6 +67,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadCommits() throws Exception { testCommits(OPTIMISTIC, REPEATABLE_READ, true); } @@ -68,6 +75,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadCommitsNoData() throws Exception { testCommits(OPTIMISTIC, REPEATABLE_READ, false); } @@ -75,6 +83,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableCommits() throws Exception { testCommits(OPTIMISTIC, SERIALIZABLE, true); } @@ -82,6 +91,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableCommitsNoData() throws Exception { testCommits(OPTIMISTIC, SERIALIZABLE, false); } @@ -89,6 +99,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedCommits() throws Exception { testCommits(PESSIMISTIC, READ_COMMITTED, true); } @@ -96,6 +107,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedCommitsNoData() throws Exception { testCommits(PESSIMISTIC, READ_COMMITTED, false); } @@ -103,6 +115,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadCommits() throws Exception { testCommits(PESSIMISTIC, REPEATABLE_READ, true); } @@ -110,6 +123,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadCommitsNoData() throws Exception { testCommits(PESSIMISTIC, REPEATABLE_READ, false); } @@ -117,6 +131,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableCommits() throws Exception { testCommits(PESSIMISTIC, SERIALIZABLE, true); } @@ -124,6 +139,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableCommitsNoData() throws Exception { testCommits(PESSIMISTIC, SERIALIZABLE, false); } @@ -131,6 +147,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedRollbacks() throws Exception { testRollbacks(OPTIMISTIC, READ_COMMITTED, true); } @@ -138,6 +155,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedRollbacksNoData() throws Exception { testRollbacks(OPTIMISTIC, READ_COMMITTED, false); } @@ -145,6 +163,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadRollbacks() throws Exception { testRollbacks(OPTIMISTIC, REPEATABLE_READ, true); } @@ -152,6 +171,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadRollbacksNoData() throws Exception { testRollbacks(OPTIMISTIC, REPEATABLE_READ, false); } @@ -159,6 +179,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableRollbacks() throws Exception { testRollbacks(OPTIMISTIC, SERIALIZABLE, true); } @@ -166,6 +187,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableRollbacksNoData() throws Exception { testRollbacks(OPTIMISTIC, SERIALIZABLE, false); } @@ -173,6 +195,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedRollbacks() throws Exception { testRollbacks(PESSIMISTIC, READ_COMMITTED, true); } @@ -180,6 +203,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedRollbacksNoData() throws Exception { testRollbacks(PESSIMISTIC, READ_COMMITTED, false); } @@ -187,6 +211,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadRollbacks() throws Exception { testRollbacks(PESSIMISTIC, REPEATABLE_READ, true); } @@ -194,6 +219,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadRollbacksNoData() throws Exception { testRollbacks(PESSIMISTIC, REPEATABLE_READ, false); } @@ -201,6 +227,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableRollbacks() throws Exception { testRollbacks(PESSIMISTIC, SERIALIZABLE, true); } @@ -208,6 +235,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableRollbacksNoData() throws Exception { testRollbacks(PESSIMISTIC, SERIALIZABLE, false); } @@ -215,6 +243,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSuspendedReadCommittedTxTimeoutRollbacks() throws Exception { doTestSuspendedTxTimeoutRollbacks(OPTIMISTIC, READ_COMMITTED); } @@ -222,6 +251,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSuspendedRepeatableReadTxTimeoutRollbacks() throws Exception { doTestSuspendedTxTimeoutRollbacks(OPTIMISTIC, REPEATABLE_READ); } @@ -229,6 +259,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticSuspendedSerializableTxTimeoutRollbacks() throws Exception { doTestSuspendedTxTimeoutRollbacks(OPTIMISTIC, SERIALIZABLE); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java index e981e2b..3e8e57b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java @@ -33,10 +33,14 @@ 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; /** * TTL manager eviction self test. */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest { /** */ private static final int ENTRIES_TO_PUT = 10_100; @@ -84,6 +88,7 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testLocalEviction() throws Exception { checkEviction(CacheMode.LOCAL); } @@ -91,6 +96,7 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testPartitionedEviction() throws Exception { checkEviction(CacheMode.PARTITIONED); } @@ -98,6 +104,7 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testReplicatedEviction() throws Exception { checkEviction(CacheMode.REPLICATED); } @@ -140,4 +147,4 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest Ignition.stopAll(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/GridCacheTtlManagerLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java index b117c86..f8fe560 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.util.typedef.internal.U; +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.cache.CacheMode.REPLICATED; @@ -32,10 +35,12 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Check ttl manager for memory leak. */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerLoadTest extends GridCacheTtlManagerSelfTest { /** * @throws Exception If failed. */ + @Test public void testLoad() throws Exception { cacheMode = REPLICATED; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java index d25b2af..3906aa4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java @@ -39,6 +39,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.eclipse.jetty.util.BlockingArrayQueue; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -46,6 +49,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; /** * */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerNotificationTest extends GridCommonAbstractTest { /** Count of caches in multi caches test. */ private static final int CACHES_CNT = 10; @@ -98,6 +102,7 @@ public class GridCacheTtlManagerNotificationTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testThatNotificationWorkAsExpected() throws Exception { try (final Ignite g = startGrid(0)) { final BlockingArrayQueue<Event> queue = new BlockingArrayQueue<>(); @@ -134,6 +139,7 @@ public class GridCacheTtlManagerNotificationTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testThatNotificationWorkAsExpectedInMultithreadedMode() throws Exception { final CyclicBarrier barrier = new CyclicBarrier(21); final AtomicInteger keysRangeGen = new AtomicInteger(); @@ -185,6 +191,7 @@ public class GridCacheTtlManagerNotificationTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testThatNotificationWorkAsExpectedManyCaches() throws Exception { final int smallDuration = 4_000; @@ -294,4 +301,4 @@ public class GridCacheTtlManagerNotificationTest extends GridCommonAbstractTest } } } -} \ 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/GridCacheTtlManagerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java index c48913e..77ecee7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; 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.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -40,6 +43,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * TTL manager self test. */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -77,6 +81,7 @@ public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalTtl() throws Exception { checkTtl(LOCAL); } @@ -84,6 +89,7 @@ public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionedTtl() throws Exception { checkTtl(PARTITIONED); } @@ -91,6 +97,7 @@ public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReplicatedTtl() throws Exception { checkTtl(REPLICATED); } @@ -129,4 +136,4 @@ public class GridCacheTtlManagerSelfTest 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/GridCacheUtilsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java index 0e751d1..8dc33e6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.logger.NullLogger; import org.apache.ignite.marshaller.MarshallerContextTestImpl; 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; /** * Grid cache utils test. */ +@RunWith(JUnit4.class) public class GridCacheUtilsSelfTest extends GridCommonAbstractTest { /** * Does not override equals and hashCode. @@ -117,6 +121,7 @@ public class GridCacheUtilsSelfTest extends GridCommonAbstractTest { /** */ + @Test public void testCacheKeyValidation() throws IgniteCheckedException { CU.validateCacheKey("key"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java index e32d8aa..2d0eed0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.cache.CacheRebalanceMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import 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; @@ -30,6 +33,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -61,6 +65,7 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testOnHeapTiered() throws Exception { startGrids(1); @@ -108,4 +113,4 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes } } } -} \ 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/GridCacheValueConsistencyAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java index 6ef6ed4..6cb9d05 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCacheAbstractSelfTest { /** Number of threads for test. */ private static final int THREAD_CNT = 16; @@ -70,11 +74,6 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - if (nearEnabled()) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - // Need to increase value set in GridAbstractTest sizePropVal = System.getProperty(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE); @@ -84,6 +83,14 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach } /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { super.afterTestsStopped(); @@ -105,6 +112,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** * @throws Exception If failed. */ + @Test public void testPutRemove() throws Exception { awaitPartitionMapExchange(); @@ -163,6 +171,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** * @throws Exception If failed. */ + @Test public void testPutRemoveAll() throws Exception { awaitPartitionMapExchange(); @@ -226,6 +235,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** * @throws Exception If failed. */ + @Test public void testPutConsistencyMultithreaded() throws Exception { if (nearEnabled()) fail("https://issues.apache.org/jira/browse/IGNITE-627"); @@ -279,6 +289,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** * @throws Exception If failed. */ + @Test public void testPutRemoveConsistencyMultithreaded() throws Exception { if (nearEnabled()) fail("https://issues.apache.org/jira/browse/IGNITE-627"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java index b9f7a35..82f0817 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java @@ -39,6 +39,10 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; +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.CacheMode.PARTITIONED; @@ -46,6 +50,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Affinity routing tests. */ +@RunWith(JUnit4.class) public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { /** */ private static final Random RAND = new Random(); @@ -54,6 +59,7 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7388"); @@ -117,6 +123,7 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testNodeStop() throws Exception { // -- Test parameters. -- // int nodeCnt = 3; @@ -210,4 +217,4 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { //debugFut.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/GridCacheVersionMultinodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java index ccecfb7..c89c7ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; 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; @@ -42,6 +45,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** */ private CacheAtomicityMode atomicityMode; @@ -90,6 +94,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionTx() throws Exception { atomicityMode = TRANSACTIONAL; @@ -99,6 +104,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionTxNearEnabled() throws Exception { atomicityMode = TRANSACTIONAL; @@ -110,6 +116,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionMvccTx() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -121,6 +128,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionMvccTxNearEnabled() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -134,6 +142,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionAtomicPrimary() throws Exception { atomicityMode = ATOMIC; @@ -143,6 +152,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionAtomicPrimaryNearEnabled() throws Exception { atomicityMode = ATOMIC; @@ -251,4 +261,4 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { assertTrue(verified); } -} \ 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/GridCacheVersionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java index 9cec7ec..f70dfd2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java @@ -23,14 +23,19 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersionEx; import org.apache.ignite.marshaller.Marshaller; 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; /** * */ +@RunWith(JUnit4.class) public class GridCacheVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyVersionDrId() throws Exception { GridCacheVersion ver = version(10, 0); @@ -76,6 +81,7 @@ public class GridCacheVersionSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMarshalling() throws Exception { GridCacheVersion ver = version(1, 1); GridCacheVersionEx verEx = new GridCacheVersionEx(2, 2, 0, ver); @@ -100,4 +106,4 @@ public class GridCacheVersionSelfTest extends GridCommonAbstractTest { private GridCacheVersion version(int nodeOrder, int drId) { return new GridCacheVersion(0, 0, nodeOrder, drId); } -} \ 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/GridCacheVersionTopologyChangeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java index ad781e8..f72162e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.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.GridTestUtils.SF; 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; @@ -46,6 +49,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -69,6 +73,7 @@ public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionIncreaseAtomic() throws Exception { checkVersionIncrease(cacheConfigurations(ATOMIC)); } @@ -76,6 +81,7 @@ public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionIncreaseTx() throws Exception { checkVersionIncrease(cacheConfigurations(TRANSACTIONAL)); } @@ -83,6 +89,7 @@ public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionIncreaseMvccTx() throws Exception { checkVersionIncrease(cacheConfigurations(TRANSACTIONAL_SNAPSHOT)); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java index 3c728f7..2398d06 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java @@ -26,10 +26,14 @@ 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; /** * Tests a check of memory configuration consistency. */ +@RunWith(JUnit4.class) public class GridDataStorageConfigurationConsistencySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -56,6 +60,7 @@ public class GridDataStorageConfigurationConsistencySelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testMemoryConfigurationConsistency() throws Exception { GridTestUtils.assertThrows(log, new Callable<Void>() { /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java index cb74666..d9ab3ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.util.IgniteUtils; 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; /** * Tests for the eviction policy JMX beans registered by the kernal. */ +@RunWith(JUnit4.class) public class GridEvictionPolicyMBeansTest extends GridCommonAbstractTest { /** Create test and auto-start the grid */ public GridEvictionPolicyMBeansTest() { @@ -99,6 +103,7 @@ public class GridEvictionPolicyMBeansTest extends GridCommonAbstractTest { } /** Check that eviction bean is available */ + @Test public void testEvictionPolicyBeans() throws Exception{ checkBean("cache1", "org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy", "MaxSize", 100); checkBean("cache1", "org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy", "BatchSize", 10); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java index 827b3cf..c2fea0c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import javax.cache.expiry.ExpiryPolicy; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks whether storing to local store doesn't cause binary objects unmarshalling, @@ -36,6 +39,7 @@ import java.util.UUID; * https://issues.apache.org/jira/browse/IGNITE-2753 * </a> */ +@RunWith(JUnit4.class) public class GridLocalCacheStoreManagerDeserializationTest extends GridCacheStoreManagerDeserializationTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -50,6 +54,7 @@ public class GridLocalCacheStoreManagerDeserializationTest extends GridCacheStor * * @throws Exception */ + @Test public void testUpdate() throws Exception { // Goal is to check correct saving to store (no exception must be thrown) @@ -78,6 +83,7 @@ public class GridLocalCacheStoreManagerDeserializationTest extends GridCacheStor * * @throws Exception */ + @Test public void testBinaryUpdate() throws Exception { // Goal is to check correct saving to store (no exception must be thrown) final Ignite grid = startGrid("binaryGrid"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java index 00b3137..1ced797 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java @@ -39,10 +39,14 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for local Ignite instance processing during serialization/deserialization. */ +@RunWith(JUnit4.class) public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache_name"; @@ -63,6 +67,7 @@ public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPutGetSimple() throws Exception { checkPutGet(new SimpleTestObject("one"), null); } @@ -70,6 +75,7 @@ public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetSerializable() throws Exception { checkPutGet(new SerializableTestObject("test"), null); } @@ -77,6 +83,7 @@ public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetExternalizable() throws Exception { checkPutGet(new ExternalizableTestObject("test"), null); } @@ -84,6 +91,7 @@ public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetBinarylizable() throws Exception { checkPutGet(new BinarylizableTestObject("test"), "binaryIgnite"); }