http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java index 353386b..c5433f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java @@ -17,6 +17,10 @@ package org.apache.ignite.internal.processors.cache; +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; import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED; @@ -26,10 +30,12 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstractFailoverSelfTest { /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedTxConstantTopologyChange() throws Exception { testConstantTopologyChange(OPTIMISTIC, READ_COMMITTED); } @@ -37,6 +43,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadTxConstantTopologyChange() throws Exception { testConstantTopologyChange(OPTIMISTIC, REPEATABLE_READ); } @@ -44,6 +51,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTxConstantTopologyChange() throws Exception { testConstantTopologyChange(OPTIMISTIC, SERIALIZABLE); } @@ -51,6 +59,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedTxConstantTopologyChange() throws Exception { testConstantTopologyChange(PESSIMISTIC, READ_COMMITTED); } @@ -58,6 +67,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadTxConstantTopologyChange() throws Exception { testConstantTopologyChange(PESSIMISTIC, REPEATABLE_READ); } @@ -65,6 +75,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableTxConstantTopologyChange() throws Exception { testConstantTopologyChange(PESSIMISTIC, SERIALIZABLE); } @@ -72,6 +83,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedTxTopologyChange() throws Exception { testTopologyChange(OPTIMISTIC, READ_COMMITTED); } @@ -79,6 +91,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadTxTopologyChange() throws Exception { testTopologyChange(OPTIMISTIC, REPEATABLE_READ); } @@ -86,6 +99,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTxTopologyChange() throws Exception { testTopologyChange(OPTIMISTIC, SERIALIZABLE); } @@ -93,6 +107,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedTxTopologyChange() throws Exception { testTopologyChange(PESSIMISTIC, READ_COMMITTED); } @@ -100,6 +115,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadTxTopologyChange() throws Exception { testTopologyChange(PESSIMISTIC, REPEATABLE_READ); } @@ -107,7 +123,8 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableTxTopologyChange() throws Exception { testTopologyChange(PESSIMISTIC, SERIALIZABLE); } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 140efb0..809ec59 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.internal.util.typedef.CIX1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multithreaded cache API tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends GridCacheAbstractSelfTest { /** */ private static final Random RND = new Random(); @@ -163,6 +167,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testContainsKey() throws Exception { runTest(new CI1<IgniteCache<String, Integer>>() { @Override public void apply(IgniteCache<String, Integer> cache) { @@ -175,6 +180,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testGet() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -189,6 +195,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testGetAsyncOld() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -210,6 +217,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testGetAsync() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -225,6 +233,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testGetAll() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -243,6 +252,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testGetAllAsyncOld() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -265,6 +275,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testGetAllAsync() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -283,6 +294,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testRemove() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -314,6 +326,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testRemoveAsyncOld() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -352,6 +365,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testRemoveAsync() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -384,6 +398,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testRemoveAll() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -404,6 +419,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsyncOld() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -428,6 +444,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsync() throws Exception { runTest(new CIX1<IgniteCache<String, Integer>>() { @Override public void applyx(IgniteCache<String, Integer> cache) { @@ -463,4 +480,4 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid private <K, V> boolean removeAsync(IgniteCache<K, V> cache, K key, V val) { return cache.removeAsync(key, val).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/GridCacheAbstractFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 5f4f349..8c4ea1e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -103,6 +103,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; 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.cache.CacheAtomicityMode.ATOMIC; @@ -128,6 +131,7 @@ import static org.apache.ignite.transactions.TransactionState.COMMITTED; * Full API cache test. */ @SuppressWarnings("TransientFieldInNonSerializableClass") +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest { /** Test timeout */ private static final long TEST_TIMEOUT = 60 * 1000; @@ -274,6 +278,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception if something goes bad. */ + @Test public void testInvokeAllMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-4380"); @@ -299,6 +304,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * Checks that skipStore flag gets overridden inside a transaction. */ + @Test public void testWriteThroughTx() { String key = "writeThroughKey"; @@ -325,6 +331,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * Checks that skipStore flag gets overridden inside a transaction. */ + @Test public void testNoReadThroughTx() { String key = "writeThroughKey"; @@ -406,6 +413,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testSize() throws Exception { assert jcache().localSize() == 0; @@ -471,6 +479,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testContainsKey() throws Exception { jcache().put("testContainsKey", 1); @@ -481,6 +490,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testContainsKeyTx() throws Exception { if (!txEnabled()) return; @@ -515,6 +525,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testContainsKeysTx() throws Exception { if (!txEnabled()) return; @@ -556,6 +567,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveInExplicitLocks() throws Exception { if (lockingEnabled()) { IgniteCache<String, Integer> cache = jcache(); @@ -581,6 +593,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveAllSkipStore() throws Exception { IgniteCache<String, Integer> jcache = jcache(); @@ -596,6 +609,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testAtomicOps() throws IgniteCheckedException { IgniteCache<String, Integer> c = jcache(); @@ -628,6 +642,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGet() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -642,6 +657,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetEntry() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -666,6 +682,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -686,6 +703,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -715,6 +733,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAll() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -795,6 +814,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetEntries() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -911,6 +931,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAllWithLastNull() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -931,6 +952,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAllWithFirstNull() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -951,6 +973,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAllWithInTheMiddle() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -972,6 +995,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetTxNonExistingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart()) { @@ -983,6 +1007,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAllAsync() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -1010,6 +1035,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAllAsyncOld() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -1041,6 +1067,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPut() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -1077,6 +1104,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutTx() throws Exception { if (txShouldBeUsed()) { IgniteCache<String, Integer> cache = jcache(); @@ -1116,6 +1144,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticReadCommitted() throws Exception { checkTransform(OPTIMISTIC, READ_COMMITTED); } @@ -1123,6 +1152,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticRepeatableRead() throws Exception { checkTransform(OPTIMISTIC, REPEATABLE_READ); } @@ -1130,6 +1160,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticReadCommitted() throws Exception { checkTransform(PESSIMISTIC, READ_COMMITTED); } @@ -1137,6 +1168,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticRepeatableRead() throws Exception { checkTransform(PESSIMISTIC, REPEATABLE_READ); } @@ -1144,6 +1176,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIgniteTransformOptimisticReadCommitted() throws Exception { checkIgniteTransform(OPTIMISTIC, READ_COMMITTED); } @@ -1151,6 +1184,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIgniteTransformOptimisticRepeatableRead() throws Exception { checkIgniteTransform(OPTIMISTIC, REPEATABLE_READ); } @@ -1158,6 +1192,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIgniteTransformPessimisticReadCommitted() throws Exception { checkIgniteTransform(PESSIMISTIC, READ_COMMITTED); } @@ -1165,6 +1200,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIgniteTransformPessimisticRepeatableRead() throws Exception { checkIgniteTransform(PESSIMISTIC, REPEATABLE_READ); } @@ -1281,6 +1317,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAllOptimisticReadCommitted() throws Exception { checkTransformAll(OPTIMISTIC, READ_COMMITTED); } @@ -1288,6 +1325,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAllOptimisticRepeatableRead() throws Exception { checkTransformAll(OPTIMISTIC, REPEATABLE_READ); } @@ -1295,6 +1333,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAllPessimisticReadCommitted() throws Exception { checkTransformAll(PESSIMISTIC, READ_COMMITTED); } @@ -1302,6 +1341,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAllPessimisticRepeatableRead() throws Exception { checkTransformAll(PESSIMISTIC, REPEATABLE_READ); } @@ -1392,6 +1432,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAllWithNulls() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -1438,6 +1479,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformSequentialOptimisticNoStart() throws Exception { checkTransformSequential0(false, OPTIMISTIC); } @@ -1445,6 +1487,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformSequentialPessimisticNoStart() throws Exception { checkTransformSequential0(false, PESSIMISTIC); } @@ -1452,6 +1495,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformSequentialOptimisticWithStart() throws Exception { checkTransformSequential0(true, OPTIMISTIC); } @@ -1459,6 +1503,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformSequentialPessimisticWithStart() throws Exception { checkTransformSequential0(true, PESSIMISTIC); } @@ -1515,6 +1560,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAfterRemoveOptimistic() throws Exception { checkTransformAfterRemove(OPTIMISTIC); } @@ -1522,6 +1568,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformAfterRemovePessimistic() throws Exception { checkTransformAfterRemove(PESSIMISTIC); } @@ -1558,6 +1605,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetOptimisticReadCommitted() throws Exception { checkTransformReturnValue(false, OPTIMISTIC, READ_COMMITTED); } @@ -1565,6 +1613,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetOptimisticRepeatableRead() throws Exception { checkTransformReturnValue(false, OPTIMISTIC, REPEATABLE_READ); } @@ -1572,6 +1621,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetPessimisticReadCommitted() throws Exception { checkTransformReturnValue(false, PESSIMISTIC, READ_COMMITTED); } @@ -1579,6 +1629,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetPessimisticRepeatableRead() throws Exception { checkTransformReturnValue(false, PESSIMISTIC, REPEATABLE_READ); } @@ -1586,6 +1637,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformReturnValuePutInTx() throws Exception { checkTransformReturnValue(true, OPTIMISTIC, READ_COMMITTED); } @@ -1631,6 +1683,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAndPutAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -1657,6 +1710,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAndPutAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -1677,6 +1731,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutAsyncOld0() throws Exception { IgniteCache<String, Integer> cacheAsync = jcache().withAsync(); @@ -1695,6 +1750,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutAsync0() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -1709,6 +1765,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testInvokeAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -1744,6 +1801,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testInvokeAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -1771,6 +1829,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -1814,6 +1873,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutx() throws Exception { if (txShouldBeUsed()) checkPut(true); @@ -1822,6 +1882,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutxNoTx() throws Exception { checkPut(false); } @@ -1866,6 +1927,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutAsyncOld() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -1911,6 +1973,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutAsync() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -1950,6 +2013,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutAll() throws Exception { Map<String, Integer> map = F.asMap("key1", 1, "key2", 2); @@ -1976,6 +2040,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testNullInTx() throws Exception { if (!txShouldBeUsed()) return; @@ -2067,6 +2132,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutAllWithNulls() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -2195,6 +2261,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutAllAsyncOld() throws Exception { Map<String, Integer> map = F.asMap("key1", 1, "key2", 2); @@ -2225,6 +2292,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutAllAsync() throws Exception { Map<String, Integer> map = F.asMap("key1", 1, "key2", 2); @@ -2249,6 +2317,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAndPutIfAbsent() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2326,6 +2395,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsyncOld() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2398,6 +2468,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsync() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2459,6 +2530,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -2504,6 +2576,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsync() throws Exception { if (txShouldBeUsed()) checkPutxIfAbsentAsync(true); @@ -2512,6 +2585,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsyncNoTx() throws Exception { checkPutxIfAbsentAsync(false); } @@ -2646,6 +2720,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutIfAbsentAsyncConcurrentOld() throws Exception { IgniteCache<String, Integer> cacheAsync = jcache().withAsync(); @@ -2664,6 +2739,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPutIfAbsentAsyncConcurrent() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -2678,6 +2754,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndReplace() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -2763,6 +2840,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -2811,6 +2889,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndReplaceAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -2891,6 +2970,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndReplaceAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -2953,6 +3033,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testReplacexAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3015,6 +3096,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testReplacexAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3065,6 +3147,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGetAndRemove() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3083,6 +3166,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndRemoveObject() throws Exception { IgniteCache<String, TestValue> cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -3113,6 +3197,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndPutObject() throws Exception { IgniteCache<String, TestValue> cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -3139,6 +3224,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception If failed. */ + @Test public void testDeletedEntriesFlag() throws Exception { if (cacheMode() != LOCAL && cacheMode() != REPLICATED) { final int cnt = 3; @@ -3159,6 +3245,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveLoad() throws Exception { int cnt = 10; @@ -3190,6 +3277,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveLoadAsync() throws Exception { if (isMultiJvm()) return; @@ -3224,6 +3312,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3258,6 +3347,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3282,6 +3372,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemove() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3295,6 +3386,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemovexAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3316,6 +3408,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemovexAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3331,6 +3424,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAll() throws Exception { globalRemoveAll(false); } @@ -3338,6 +3432,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAllAsync() throws Exception { globalRemoveAll(true); } @@ -3469,6 +3564,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAllWithNulls() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -3523,6 +3619,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAllDuplicates() throws Exception { jcache().removeAll(ImmutableSet.of("key1", "key1", "key1")); } @@ -3530,6 +3627,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAllDuplicatesTx() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart()) { @@ -3543,6 +3641,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAllEmpty() throws Exception { jcache().removeAll(); } @@ -3550,6 +3649,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsyncOld() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3575,6 +3675,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsync() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3596,6 +3697,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testLoadAll() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3633,6 +3735,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveAfterClear() throws Exception { IgniteEx ignite = grid(0); @@ -3679,6 +3782,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testClear() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -3823,6 +3927,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearAll() throws Exception { globalClearAll(false, false); } @@ -3830,6 +3935,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearAllAsyncOld() throws Exception { globalClearAll(true, true); } @@ -3837,6 +3943,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearAllAsync() throws Exception { globalClearAll(true, false); } @@ -3875,6 +3982,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ @SuppressWarnings("BusyWait") + @Test public void testLockUnlock() throws Exception { if (lockingEnabled()) { final CountDownLatch lockCnt = new CountDownLatch(1); @@ -3934,6 +4042,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * @throws Exception In case of error. */ @SuppressWarnings("BusyWait") + @Test public void testLockUnlockAll() throws Exception { if (lockingEnabled()) { IgniteCache<String, Integer> cache = jcache(); @@ -3989,6 +4098,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testPeek() throws Exception { Ignite ignite = primaryIgnite("key"); IgniteCache<String, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -4005,6 +4115,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPeekTxRemoveOptimistic() throws Exception { checkPeekTxRemove(OPTIMISTIC); } @@ -4012,6 +4123,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPeekTxRemovePessimistic() throws Exception { checkPeekTxRemove(PESSIMISTIC); } @@ -4041,6 +4153,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPeekRemove() throws Exception { IgniteCache<String, Integer> cache = primaryCache("key"); @@ -4053,6 +4166,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testEvictExpired() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -4106,6 +4220,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPeekExpired() throws Exception { final IgniteCache<String, Integer> c = jcache(); @@ -4139,6 +4254,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPeekExpiredTx() throws Exception { if (txShouldBeUsed()) { final IgniteCache<String, Integer> c = jcache(); @@ -4169,6 +4285,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTtlTx() throws Exception { if (txShouldBeUsed()) checkTtl(true, false); @@ -4177,6 +4294,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTtlNoTx() throws Exception { checkTtl(false, false); } @@ -4184,6 +4302,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTtlNoTxOldEntry() throws Exception { checkTtl(false, true); } @@ -4431,6 +4550,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testLocalEvict() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -4473,6 +4593,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * JUnit. */ + @Test public void testCacheProxy() { IgniteCache<String, Integer> cache = jcache(); @@ -4482,6 +4603,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testCompactExpired() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -4515,6 +4637,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception If failed. */ + @Test public void testOptimisticTxMissingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { @@ -4531,6 +4654,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception If failed. */ + @Test public void testOptimisticTxMissingKeyNoCommit() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { @@ -4545,6 +4669,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testOptimisticTxReadCommittedInTx() throws Exception { checkRemovexInTx(OPTIMISTIC, READ_COMMITTED); } @@ -4552,6 +4677,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testOptimisticTxRepeatableReadInTx() throws Exception { checkRemovexInTx(OPTIMISTIC, REPEATABLE_READ); } @@ -4559,6 +4685,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPessimisticTxReadCommittedInTx() throws Exception { checkRemovexInTx(PESSIMISTIC, READ_COMMITTED); } @@ -4566,6 +4693,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableReadInTx() throws Exception { checkRemovexInTx(PESSIMISTIC, REPEATABLE_READ); } @@ -4614,6 +4742,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception If failed. */ + @Test public void testPessimisticTxMissingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { @@ -4630,6 +4759,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception If failed. */ + @Test public void testPessimisticTxMissingKeyNoCommit() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { @@ -4644,6 +4774,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableRead() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { @@ -4657,6 +4788,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableReadOnUpdate() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { @@ -4670,6 +4802,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ + @Test public void testToMap() throws Exception { IgniteCache<String, Integer> cache = jcache(); @@ -4798,6 +4931,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -4825,6 +4959,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIgniteCacheIterator() throws Exception { IgniteCache<String, Integer> cache = jcache(0); @@ -4871,6 +5006,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testIteratorLeakOnCancelCursor() throws Exception { IgniteCache<String, Integer> cache = jcache(0); @@ -5065,6 +5201,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testLocalClearKey() throws Exception { addKeys(); @@ -5116,6 +5253,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testLocalClearKeys() throws Exception { Map<String, List<String>> keys = addKeys(); @@ -5187,6 +5325,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearKey() throws Exception { testGlobalClearKey(false, Arrays.asList("key25"), false); } @@ -5194,6 +5333,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeyAsyncOld() throws Exception { testGlobalClearKey(true, Arrays.asList("key25"), true); } @@ -5201,6 +5341,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeyAsync() throws Exception { testGlobalClearKey(true, Arrays.asList("key25"), false); } @@ -5208,6 +5349,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeys() throws Exception { testGlobalClearKey(false, Arrays.asList("key25", "key100", "key150"), false); } @@ -5215,6 +5357,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeysAsyncOld() throws Exception { testGlobalClearKey(true, Arrays.asList("key25", "key100", "key150"), true); } @@ -5222,6 +5365,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeysAsync() throws Exception { testGlobalClearKey(true, Arrays.asList("key25", "key100", "key150"), false); } @@ -5288,6 +5432,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testWithSkipStore() throws Exception { IgniteCache<String, Integer> cache = jcache(0); @@ -5497,6 +5642,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testWithSkipStoreRemoveAll() throws Exception { if (atomicityMode() == TRANSACTIONAL || (atomicityMode() == ATOMIC && nearEnabled())) // TODO IGNITE-373. return; @@ -5538,6 +5684,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testWithSkipStoreTx() throws Exception { if (txShouldBeUsed()) { IgniteCache<String, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -5840,6 +5987,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetOutTx() throws Exception { checkGetOutTx(false); } @@ -5847,6 +5995,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetOutTxAsync() throws Exception { checkGetOutTx(true); } @@ -5924,6 +6073,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformException() throws Exception { final IgniteCache<String, Integer> cache = jcache(); @@ -5945,6 +6095,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testLockInsideTransaction() throws Exception { if (txEnabled()) { GridTestUtils.assertThrows( @@ -5986,6 +6137,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTransformResourceInjection() throws Exception { ClusterGroup servers = grid(0).cluster().forServers(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java index 570f43c..3c1c16a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.util.typedef.CA; import org.apache.ignite.internal.util.typedef.CAX; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for cache iterators. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstractSelfTest { /** Key prefix. */ protected static final String KEY_PREFIX = "testKey"; @@ -48,6 +52,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testCacheIterator() throws Exception { int cnt = 0; @@ -69,6 +74,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testCacheIteratorMultithreaded() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).removeAll(); @@ -96,6 +102,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testEntrySetIterator() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10082"); @@ -122,6 +129,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testEntrySetIteratorMultithreaded() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).removeAll(); @@ -146,4 +154,4 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra }, 3, "iterator-thread"); } -} \ 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/GridCacheAbstractLocalStoreSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java index 28a4b51..bb4bcd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java @@ -65,6 +65,9 @@ import org.apache.ignite.testframework.GridTestUtils; 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.IgniteSystemProperties.IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -74,6 +77,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -203,6 +207,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testEvict() throws Exception { Ignite ignite1 = startGrid(1); @@ -231,6 +236,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testPrimaryNode() throws Exception { Ignite ignite1 = startGrid(1); @@ -279,6 +285,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testBackupRestorePrimary() throws Exception { testBackupRestore(); } @@ -286,6 +293,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testBackupRestore() throws Exception { final IgniteEx ignite1 = startGrid(1); Ignite ignite2 = startGrid(2); @@ -405,6 +413,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testLocalStoreCorrespondsAffinityWithBackups() throws Exception { testLocalStoreCorrespondsAffinity(BACKUP_CACHE_2); } @@ -412,6 +421,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testLocalStoreCorrespondsAffinityWithBackup() throws Exception { testLocalStoreCorrespondsAffinity(BACKUP_CACHE_1); } @@ -419,6 +429,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testLocalStoreCorrespondsAffinityNoBackups() throws Exception { testLocalStoreCorrespondsAffinity(DEFAULT_CACHE_NAME); } @@ -505,6 +516,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testLocalStoreWithNearKeysPrimary() throws Exception { try { System.setProperty(IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY, "true"); @@ -519,6 +531,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testLocalStoreWithNearKeysPrimaryAndBackups() throws Exception { testLocalStoreWithNearKeys(); } @@ -526,6 +539,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testLocalStoreWithNearKeys() throws Exception { if (getCacheMode() == REPLICATED) return; @@ -618,6 +632,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testBackupNode() throws Exception { Ignite ignite1 = startGrid(1); @@ -683,6 +698,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testSwap() throws Exception { Ignite ignite1 = startGrid(1); @@ -882,4 +898,4 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst return LOCAL_STORE_6; } } -} \ 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/GridCacheAbstractMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java index 3c0f001..873987a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java @@ -45,12 +45,16 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * Cache metrics test. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int KEY_CNT = 500; @@ -169,6 +173,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetMetricsDisable() throws Exception { // Disable statistics. for (int i = 0; i < gridCount(); i++) { @@ -262,6 +267,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetMetricsSnapshot() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -271,6 +277,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndRemoveAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -288,6 +295,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveAsyncValAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -315,6 +323,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveAvgTime() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -332,6 +341,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveAllAvgTime() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -356,6 +366,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoveAllAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -385,6 +396,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAvgTime() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -406,6 +418,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAllAvgTime() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -430,6 +443,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAllAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -458,6 +472,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutAvgTime() throws Exception { final IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -475,6 +490,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -491,6 +507,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndPutAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -518,6 +535,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutIfAbsentAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -543,6 +561,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsyncAvgTime() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -568,6 +587,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutAllAvgTime() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -591,6 +611,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testPutsReads() throws Exception { IgniteCache<Integer, Integer> cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -649,6 +670,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testMissHitPercentage() throws Exception { IgniteCache<Integer, Integer> cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -683,6 +705,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testMisses() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -725,6 +748,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testMissesOnEmptyCache() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -763,6 +787,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testRemoves() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -779,6 +804,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract * * @throws Exception If failed. */ + @Test public void testCacheSizeWorksAsSize() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -816,6 +842,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testTxEvictions() throws Exception { if (grid(0).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getAtomicityMode() != CacheAtomicityMode.ATOMIC) checkTtl(true); @@ -824,6 +851,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws Exception If failed. */ + @Test public void testNonTxEvictions() throws Exception { if (grid(0).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getAtomicityMode() == CacheAtomicityMode.ATOMIC) checkTtl(false); @@ -1038,6 +1066,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvocationRemovesOnEmptyCache() throws IgniteCheckedException { testInvocationRemoves(true); } @@ -1045,6 +1074,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvocationRemoves() throws IgniteCheckedException { testInvocationRemoves(false); } @@ -1094,6 +1124,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testUpdateInvocationsOnEmptyCache() throws IgniteCheckedException { testUpdateInvocations(true); } @@ -1101,6 +1132,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testUpdateInvocations() throws IgniteCheckedException { testUpdateInvocations(false); } @@ -1150,6 +1182,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testReadOnlyInvocationsOnEmptyCache() throws IgniteCheckedException { testReadOnlyInvocations(true); } @@ -1157,6 +1190,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testReadOnlyInvocations() throws IgniteCheckedException { testReadOnlyInvocations(false); } @@ -1201,6 +1235,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAvgTime() throws IgniteCheckedException { IgniteCache<Integer, Integer> cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1265,6 +1300,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAsyncAvgTime() throws IgniteCheckedException { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1282,6 +1318,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllAvgTime() throws IgniteCheckedException { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1299,6 +1336,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllAsyncAvgTime() throws IgniteCheckedException { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1317,6 +1355,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllMultipleKeysAvgTime() throws IgniteCheckedException { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1336,6 +1375,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllAsyncMultipleKeysAvgTime() throws IgniteCheckedException { IgniteCache<Integer, Integer> cache = grid(0).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/GridCacheAbstractRemoveFailureTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java index d7406c0..ecf8233 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java @@ -55,6 +55,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import java.util.concurrent.ConcurrentHashMap; +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; @@ -67,6 +70,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * Tests that removes are not lost when topology changes. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -151,6 +155,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutAndRemove() throws Exception { putAndRemove(duration(), null, null); } @@ -158,6 +163,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutAndRemovePessimisticTx() throws Exception { if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL) return; @@ -168,6 +174,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutAndRemoveOptimisticSerializableTx() throws Exception { if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL) return; @@ -484,4 +491,4 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr return ThreadLocalRandom.current().nextInt(min, max); } -} \ 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/GridCacheAbstractTxReadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java index 8af3feb..140f226 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests value read inside transaction. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -52,6 +56,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadOptimisticReadCommitted() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED); } @@ -59,6 +64,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadOptimisticRepeatableRead() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.REPEATABLE_READ); } @@ -66,6 +72,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadOptimisticSerializable() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE); } @@ -73,6 +80,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadPessimisticReadCommitted() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.READ_COMMITTED); } @@ -80,6 +88,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadPessimisticRepeatableRead() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ); } @@ -87,6 +96,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadPessimisticSerializable() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); } @@ -134,4 +144,4 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT @Override protected int gridCount() { return 1; } -} \ 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/GridCacheAbstractUsersAffinityMapperSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java index 37355f7..63fad70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java @@ -36,12 +36,16 @@ 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.CacheRebalanceMode.SYNC; /** * Test affinity mapper. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractUsersAffinityMapperSelfTest extends GridCommonAbstractTest { /** */ private static final int KEY_CNT = 1000; @@ -106,6 +110,7 @@ public abstract class GridCacheAbstractUsersAffinityMapperSelfTest extends GridC /** * @throws Exception If failed. */ + @Test public void testAffinityMapper() throws Exception { IgniteCache<Object, Object> cache = startGrid(0).cache(DEFAULT_CACHE_NAME); @@ -212,4 +217,4 @@ public abstract class GridCacheAbstractUsersAffinityMapperSelfTest extends GridC // No-op. } } -} \ No newline at end of file +}