You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/12/11 08:29:25 UTC
[38/51] [partial] ignite git commit: IGNITE-10175 migrate core
modules tests from Junit 3 to 4 - Fixes #5562.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
index 12e8042..04a3cfa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
@@ -46,6 +46,9 @@ import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
import org.jetbrains.annotations.Nullable;
import java.util.concurrent.ConcurrentHashMap;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -55,6 +58,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
* Tests {@link CacheInterceptor}.
*/
+@RunWith(JUnit4.class)
public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbstractSelfTest {
/** */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -85,6 +89,17 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
}
/** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR);
+
+ if (nearEnabled())
+ MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+ if (storeEnabled())
+ MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+ }
+
+ /** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
interceptor.reset();
@@ -144,6 +159,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testGet() throws Exception {
testGet(primaryKey(0), false);
@@ -156,6 +172,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetEntry() throws Exception {
testGet(primaryKey(0), true);
@@ -263,6 +280,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAll() throws Exception {
testGetAll(false);
}
@@ -270,6 +288,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetEntries() throws Exception {
testGetAll(true);
}
@@ -416,6 +435,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testCancelUpdate() throws Exception {
for (Operation op : Operation.values()) {
testCancelUpdate(primaryKey(0), op);
@@ -523,6 +543,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testModifyUpdate() throws Exception {
for (Operation op : Operation.values()) {
testModifyUpdate(primaryKey(0), op);
@@ -598,6 +619,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testCancelRemove() throws Exception {
for (Operation op : Operation.values()) {
testCancelRemove(primaryKey(0), op);
@@ -709,6 +731,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemove() throws Exception {
for (Operation op : Operation.values()) {
testRemove(primaryKey(0), op);
@@ -842,6 +865,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testNearNodeKey() throws Exception {
if (cacheMode() != PARTITIONED)
return;
@@ -909,6 +933,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testBatchUpdate() throws Exception {
testBatchUpdate(Operation.UPDATE);
@@ -999,6 +1024,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testBatchRemove() throws Exception {
testBatchRemove(Operation.UPDATE);
@@ -1795,4 +1821,4 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
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/GridCacheInterceptorLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java
index 24c38b2..9dc71f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.junit.Before;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -29,6 +30,7 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
*/
public class GridCacheInterceptorLocalSelfTest extends GridCacheInterceptorAbstractSelfTest {
/** {@inheritDoc} */
+ @Before
@Override public void setUp() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
@@ -49,4 +51,4 @@ public class GridCacheInterceptorLocalSelfTest extends GridCacheInterceptorAbstr
@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/GridCacheInterceptorLocalWithStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java
index 6375aa6..29bbf23 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java
@@ -18,12 +18,14 @@
package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.junit.Before;
/**
* Tests {@link org.apache.ignite.cache.CacheInterceptor}.
*/
public class GridCacheInterceptorLocalWithStoreSelfTest extends GridCacheInterceptorLocalSelfTest {
/** {@inheritDoc} */
+ @Before
@Override public void setUp() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
@@ -34,4 +36,4 @@ public class GridCacheInterceptorLocalWithStoreSelfTest extends GridCacheInterce
@Override protected boolean storeEnabled() {
return true;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
index d82b14d..460ec03 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
@@ -25,10 +25,8 @@ import org.apache.ignite.testframework.MvccFeatureChecker;
*/
public class GridCacheInterceptorTransactionalRebalanceTest extends GridAbstractCacheInterceptorRebalanceTest {
/** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
+ @Override protected void beforeTest() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR);
-
- super.beforeTestsStarted();
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java
index f38a0b2..9cd2748 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java
@@ -28,12 +28,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.CacheMode.PARTITIONED;
/**
* Cache iterator performance test.
*/
+@RunWith(JUnit4.class)
public class GridCacheIteratorPerformanceTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -106,6 +110,7 @@ public class GridCacheIteratorPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSmall() throws Exception {
IgniteCache<Integer, Integer> cache = grid().cache(DEFAULT_CACHE_NAME);
@@ -135,6 +140,7 @@ public class GridCacheIteratorPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLarge() throws Exception {
IgniteCache<Integer, Integer> cache = grid().cache(DEFAULT_CACHE_NAME);
@@ -164,6 +170,7 @@ public class GridCacheIteratorPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testFiltered() throws Exception {
IgniteCache<Integer, Integer> cache = grid().cache(DEFAULT_CACHE_NAME);
@@ -243,4 +250,4 @@ public class GridCacheIteratorPerformanceTest extends GridCommonAbstractTest {
i = 0;
}
}
-}
\ 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/GridCacheKeyCheckSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
index ebb88a3..6f6a427 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
@@ -25,6 +25,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
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.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;
@@ -34,6 +37,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
* Tests for cache key check.
*/
+@RunWith(JUnit4.class)
public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/** IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -84,6 +88,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetTransactional() throws Exception {
checkGet(TRANSACTIONAL);
}
@@ -91,6 +96,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAtomic() throws Exception {
checkGet(ATOMIC);
}
@@ -98,6 +104,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTransactional() throws Exception {
checkPut(TRANSACTIONAL);
}
@@ -105,6 +112,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutAtomic() throws Exception {
checkPut(ATOMIC);
}
@@ -112,6 +120,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemoveTransactional() throws Exception {
checkRemove(TRANSACTIONAL);
}
@@ -119,6 +128,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemoveAtomic() throws Exception {
checkRemove(ATOMIC);
}
@@ -204,4 +214,4 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
return someVal;
}
}
-}
\ 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/GridCacheLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
index 1fed55f..740ab41 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
@@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
* Leak test.
*/
+@RunWith(JUnit4.class)
public class GridCacheLeakTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -87,6 +91,7 @@ public class GridCacheLeakTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLeakTransactional() throws Exception {
checkLeak(TRANSACTIONAL);
}
@@ -94,6 +99,7 @@ public class GridCacheLeakTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLeakAtomic() throws Exception {
checkLeak(ATOMIC);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
index 22d94fb..6654edc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
@@ -49,12 +49,16 @@ import org.apache.ignite.resources.IgniteInstanceResource;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.testframework.junits.common.GridAbstractLifecycleAwareSelfTest;
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;
/**
* Test for {@link LifecycleAware} support in {@link CacheConfiguration}.
*/
+@RunWith(JUnit4.class)
public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareSelfTest {
/** */
private static final String CACHE_NAME = "cache";
@@ -365,6 +369,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
/** {@inheritDoc} */
@SuppressWarnings("ErrorNotRethrown")
+ @Test
@Override public void testLifecycleAware() throws Exception {
for (boolean nearEnabled : new boolean[] {true, false}) {
near = nearEnabled;
@@ -390,4 +395,4 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
}
}
}
-}
\ 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/GridCacheMarshallerTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
index 0d616d4..c1ee82b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
@@ -28,6 +28,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.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -35,6 +38,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Test transaction with wrong marshalling.
*/
+@RunWith(JUnit4.class)
public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstractTest {
/**
* Wrong Externalizable class.
@@ -85,6 +89,7 @@ public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstra
*
* @throws Exception If failed.
*/
+ @Test
public void testValueMarshallerFail() throws Exception {
String key = UUID.randomUUID().toString();
String value = UUID.randomUUID().toString();
@@ -131,4 +136,4 @@ public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstra
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/GridCacheMarshallingNodeJoinSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
index c837e21..fd79334 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
@@ -42,17 +42,23 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
/**
*/
+@RunWith(JUnit4.class)
public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
/** {@inheritDoc} */
+ @Before
@Override public void setUp() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
@@ -91,6 +97,7 @@ public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testNodeJoin() throws Exception {
final CountDownLatch allowJoin = new CountDownLatch(1);
final CountDownLatch joined = new CountDownLatch(2);
@@ -176,4 +183,4 @@ public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest
// No-op.
}
}
-}
\ 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/GridCacheMissingCommitVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
index a6f2022..a9f6d39 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
@@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_MAX_COMPLETED_TX_COUNT;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridCacheMissingCommitVersionSelfTest extends GridCommonAbstractTest {
/** */
private volatile boolean putFailed;
@@ -86,6 +90,7 @@ public class GridCacheMissingCommitVersionSelfTest extends GridCommonAbstractTes
/**
* @throws Exception If failed.
*/
+ @Test
public void testMissingCommitVersion() throws Exception {
final IgniteCache<Integer, Integer> cache = jcache();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
index 320dacd..bfb16d4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
@@ -36,6 +36,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.cache.CacheMode.PARTITIONED;
@@ -47,6 +50,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
* exchange should be skipped in this case).
*/
@SuppressWarnings("unchecked")
+@RunWith(JUnit4.class)
public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractTest {
/** VM ip finder for TCP discovery. */
private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -93,6 +97,7 @@ public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractT
/**
* @throws Exception If failed.
*/
+ @Test
public void testNodeJoinLeave() throws Exception {
try {
cache = true;
@@ -178,4 +183,4 @@ public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractT
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/GridCacheMultiUpdateLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
index 367d8ac..9bd35bb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
@@ -34,6 +34,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.PARTITIONED;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
@@ -44,6 +47,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Tests multi-update locks.
*/
+@RunWith(JUnit4.class)
public class GridCacheMultiUpdateLockSelfTest extends GridCommonAbstractTest {
/** Shared IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -89,6 +93,7 @@ public class GridCacheMultiUpdateLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testMultiUpdateLocksNear() throws Exception {
checkMultiUpdateLocks(true);
}
@@ -96,6 +101,7 @@ public class GridCacheMultiUpdateLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testMultiUpdateLocksColocated() throws Exception {
checkMultiUpdateLocks(false);
}
@@ -202,4 +208,4 @@ public class GridCacheMultiUpdateLockSelfTest 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/GridCacheMultinodeUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
index 2027117..dadae95 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
@@ -26,6 +26,9 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheMode;
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;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -35,6 +38,7 @@ import static org.apache.ignite.testframework.MvccFeatureChecker.assertMvccWrite
* Multinode update test.
*/
@SuppressWarnings("unchecked")
+@RunWith(JUnit4.class)
public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCacheAbstractSelfTest {
/** */
protected static volatile boolean failed;
@@ -75,6 +79,7 @@ public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCache
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvoke() throws Exception {
IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -157,4 +162,4 @@ public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCache
return null;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
index aa9f029..b027bff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
@@ -18,11 +18,15 @@
package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.configuration.CacheConfiguration;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import org.apache.ignite.testframework.MvccFeatureChecker;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest extends GridCacheMultinodeUpdateNearEnabledSelfTest {
/** {@inheritDoc} */
@Override protected int gridCount() {
@@ -39,6 +43,7 @@ public class GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest extends GridCa
}
/** {@inheritDoc} */
+ @Test
@Override public void testInvoke() throws Exception {
if (!MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-809");
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
index c0738a3..9925d18 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
@@ -19,6 +19,10 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import org.apache.ignite.testframework.MvccFeatureChecker;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -26,8 +30,10 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
/**
* TODO: IGNITE-809.
*/
+@RunWith(JUnit4.class)
public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultinodeUpdateAbstractSelfTest {
/** {@inheritDoc} */
+ @Before
@Override public void setUp() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
@@ -45,10 +51,11 @@ public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultin
}
/** {@inheritDoc} */
+ @Test
@Override public void testInvoke() throws Exception {
if (!MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-809");
else
super.testInvoke();
}
-}
\ 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/GridCacheMvccFlagsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java
index c6b797a..3b28008 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java
@@ -23,12 +23,16 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
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;
/**
* Tests flags correctness.
*/
+@RunWith(JUnit4.class)
public class GridCacheMvccFlagsTest extends GridCommonAbstractTest {
/** Grid. */
private IgniteKernal grid;
@@ -66,6 +70,7 @@ public class GridCacheMvccFlagsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testAllTrueFlags() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -107,6 +112,7 @@ public class GridCacheMvccFlagsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testAllFalseFlags() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -140,4 +146,4 @@ public class GridCacheMvccFlagsTest extends GridCommonAbstractTest {
for (GridCacheMvccCandidate.Mask mask : GridCacheMvccCandidate.Mask.values())
assertFalse("Mask check failed [mask=" + mask + ", c=" + c + ']', mask.get(flags));
}
-}
\ 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/GridCacheMvccManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java
index 0a284e9..b6d39c8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java
@@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
* Tests for {@link GridCacheMvccManager}.
*/
+@RunWith(JUnit4.class)
public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest {
/** VM ip finder for TCP discovery. */
private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -72,6 +76,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testLocalCache() throws Exception {
mode = LOCAL;
@@ -79,6 +84,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testReplicatedCache() throws Exception {
mode = REPLICATED;
@@ -86,6 +92,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testPartitionedCache() throws Exception {
mode = PARTITIONED;
@@ -117,4 +124,4 @@ public class GridCacheMvccManagerSelfTest 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/GridCacheMvccPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
index 119002c..3b8a0a6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
@@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.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;
@@ -37,6 +40,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
/**
* Test cases for multi-threaded tests in partitioned cache.
*/
+@RunWith(JUnit4.class)
public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/** */
private static final UUID nodeId = UUID.randomUUID();
@@ -88,6 +92,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testNearLocalsWithPending() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -122,6 +127,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testNearLocalsWithCommitted() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -155,6 +161,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testNearLocalsWithRolledback() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -188,6 +195,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testNearLocals() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -218,6 +226,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testNearLocalsWithOwned() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -257,6 +266,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testAddPendingRemote0() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -289,6 +299,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testAddPendingRemote1() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -332,6 +343,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testAddPendingRemote2() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -376,6 +388,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* Tests salvageRemote method
*/
+ @Test
public void testSalvageRemote() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -434,6 +447,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNearRemoteConsistentOrdering0() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -472,6 +486,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNearRemoteConsistentOrdering1() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -517,6 +532,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNearRemoteConsistentOrdering2() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -562,6 +578,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNearRemoteConsistentOrdering3() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -601,6 +618,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSerializableReadLocksAdd() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -678,6 +696,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSerializableReadLocksAssign() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -817,6 +836,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSerializableLocks() throws Exception {
checkSerializableAdd(false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
index 6f52cce..1644103 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
@@ -31,12 +31,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.CacheMode.REPLICATED;
/**
* Test cases for multi-threaded tests.
*/
+@RunWith(JUnit4.class)
public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/** Grid. */
private IgniteKernal grid;
@@ -83,6 +87,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testMarshalUnmarshalCandidate() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -115,6 +120,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testRemotes() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -266,6 +272,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Tests that orderOwned does not reorder owned locks.
*/
+ @Test
public void testNearRemoteWithOwned() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -308,6 +315,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Tests that orderOwned does not reorder owned locks.
*/
+ @Test
public void testNearRemoteWithOwned1() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -354,6 +362,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Tests that orderOwned does not reorder owned locks.
*/
+ @Test
public void testNearRemoteWithOwned2() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -402,6 +411,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Tests remote candidates.
*/
+ @Test
public void testLocal() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -476,6 +486,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Tests assignment of local candidates when remote exist.
*/
+ @Test
public void testLocalWithRemote() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -512,6 +523,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseInTheMiddle() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -565,6 +577,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithCompletedBaseInTheMiddle() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -607,6 +620,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedTwiceWithBaseInTheMiddle() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -653,6 +667,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseInTheMiddleNoChange() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -692,6 +707,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseInTheBeginning() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -734,6 +750,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* This case should never happen, nevertheless we need to test for it.
*/
+ @Test
public void testCompletedWithBaseInTheBeginningNoChange() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -773,6 +790,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* This case should never happen, nevertheless we need to test for it.
*/
+ @Test
public void testCompletedWithBaseInTheEndNoChange() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -812,6 +830,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseNotPresentInTheMiddle() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -853,6 +872,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseNotPresentInTheMiddleNoChange() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -888,6 +908,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseNotPresentInTheBeginning() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -929,6 +950,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseNotPresentInTheBeginningNoChange() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -970,6 +992,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCompletedWithBaseNotPresentInTheEndNoChange() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -1007,6 +1030,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Test local and remote candidates together.
*/
+ @Test
public void testLocalAndRemote() {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -1133,6 +1157,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If test failed.
*/
+ @Test
public void testMultipleLocalAndRemoteLocks1() throws Exception {
UUID nodeId = UUID.randomUUID();
@@ -1206,6 +1231,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If test failed.
*/
+ @Test
public void testMultipleLocalAndRemoteLocks2() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -1293,6 +1319,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If test failed.
*/
+ @Test
public void testMultipleLocalLocks() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -1334,6 +1361,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
@SuppressWarnings({"ObjectEquality"})
+ @Test
public void testUsedCandidates() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -1399,6 +1427,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Test 2 keys with candidates in reverse order.
*/
+ @Test
public void testReverseOrder1() {
UUID id = UUID.randomUUID();
@@ -1452,6 +1481,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testReverseOrder2() throws Exception {
UUID id = UUID.randomUUID();
@@ -1514,6 +1544,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testReverseOrder3() throws Exception {
GridCacheAdapter<String, String> cache = grid.internalCache(DEFAULT_CACHE_NAME);
@@ -1562,6 +1593,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testReverseOrder4() throws Exception {
UUID id = UUID.randomUUID();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
index 762cc4d..035b309 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
@@ -34,6 +34,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.transactions.TransactionConcurrency.OPTIMISTIC;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -43,6 +46,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Nested transaction emulation.
*/
+@RunWith(JUnit4.class)
public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
/** */
protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -105,6 +109,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testTwoTx() throws Exception {
final IgniteCache<String, Integer> c = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -136,6 +141,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testLockAndTx() throws Exception {
final IgniteCache<String, Integer> c = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -212,6 +218,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testLockAndTx1() throws Exception {
final IgniteCache<String, Integer> c = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -281,4 +288,4 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
for (int i = 0; i < globalCntr.get(); i++)
assertNotNull(c1.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/GridCacheObjectToStringSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
index bf87035..1c82e51 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
@@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -44,6 +47,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Tests that common cache objects' toString() methods do not lead to stack overflow.
*/
+@RunWith(JUnit4.class)
public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
/** VM ip finder for TCP discovery. */
private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -93,6 +97,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testLocalCacheFifoEvictionPolicy() throws Exception {
cacheMode = LOCAL;
evictionPlc = new FifoEvictionPolicy();
@@ -101,6 +106,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testLocalCacheLruEvictionPolicy() throws Exception {
cacheMode = LOCAL;
evictionPlc = new LruEvictionPolicy();
@@ -109,6 +115,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testReplicatedCacheFifoEvictionPolicy() throws Exception {
cacheMode = REPLICATED;
evictionPlc = new FifoEvictionPolicy();
@@ -117,6 +124,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testReplicatedCacheLruEvictionPolicy() throws Exception {
cacheMode = REPLICATED;
evictionPlc = new LruEvictionPolicy();
@@ -125,6 +133,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testPartitionedCacheFifoEvictionPolicy() throws Exception {
cacheMode = PARTITIONED;
nearEnabled = true;
@@ -134,6 +143,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testPartitionedCacheLruEvictionPolicy() throws Exception {
cacheMode = PARTITIONED;
nearEnabled = true;
@@ -143,6 +153,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testColocatedCacheFifoEvictionPolicy() throws Exception {
cacheMode = PARTITIONED;
nearEnabled = false;
@@ -152,6 +163,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testColocatedCacheLruEvictionPolicy() throws Exception {
cacheMode = PARTITIONED;
nearEnabled = false;
@@ -196,4 +208,4 @@ public class GridCacheObjectToStringSelfTest 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/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
index afc41ff..c0b0dda 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
@@ -28,6 +28,9 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -35,6 +38,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
* Multithreaded update test with off heap enabled.
*/
+@RunWith(JUnit4.class)
public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extends GridCacheAbstractSelfTest {
/** */
protected static volatile boolean failed;
@@ -71,6 +75,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
/**
* @throws Exception If failed.
*/
+ @Test
public void testTransform() throws Exception {
testTransform(keyForNode(0));
@@ -115,6 +120,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
/**
* @throws Exception If failed.
*/
+ @Test
public void testPut() throws Exception {
testPut(keyForNode(0));
@@ -161,6 +167,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutxIfAbsent() throws Exception {
testPutxIfAbsent(keyForNode(0));
@@ -205,6 +212,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutGet() throws Exception {
testPutGet(keyForNode(0));
@@ -345,4 +353,4 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
return true;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java
index 40e2e23..4f50d38 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java
@@ -23,6 +23,9 @@ import org.apache.ignite.IgniteTransactions;
import org.apache.ignite.testframework.GridTestUtils;
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.transactions.TransactionConcurrency.OPTIMISTIC;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -31,6 +34,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Multithreaded update test with off heap enabled.
*/
+@RunWith(JUnit4.class)
public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest {
/** {@inheritDoc} */
@Override protected long getTestTimeout() {
@@ -40,6 +44,7 @@ public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHea
/**
* @throws Exception If failed.
*/
+ @Test
public void testTransformTx() throws Exception {
info(">>> PESSIMISTIC node 0");
@@ -109,6 +114,7 @@ public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHea
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTxPessimistic() throws Exception {
testPutTx(keyForNode(0), PESSIMISTIC);
@@ -121,6 +127,7 @@ public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHea
*
* @throws Exception If failed.
*/
+ @Test
public void testPutTxOptimistic() throws Exception {
testPutTx(keyForNode(0), OPTIMISTIC);
@@ -170,6 +177,7 @@ public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHea
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutxIfAbsentTxPessimistic() throws Exception {
testPutxIfAbsentTx(keyForNode(0), PESSIMISTIC);
@@ -182,6 +190,7 @@ public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHea
*
* @throws Exception If failed.
*/
+ @Test
public void testPutxIfAbsentTxOptimistic() throws Exception {
testPutxIfAbsentTx(keyForNode(0), OPTIMISTIC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
index cf16417..dac3e67 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
@@ -26,6 +26,9 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
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.transactions.TransactionConcurrency.OPTIMISTIC;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -35,6 +38,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Check for specific support issue.
*/
+@RunWith(JUnit4.class)
public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
@@ -56,6 +60,7 @@ public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testUpdateInPessimisticTxOnRemoteNode() throws Exception {
try {
Ignite ignite = startGrids(2);
@@ -99,6 +104,7 @@ public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testReadEvictedPartition() throws Exception {
try {
Ignite grid = startGrid(0);
@@ -146,4 +152,4 @@ public class GridCacheOffheapUpdateSelfTest 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/GridCacheOnCopyFlagAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
index 2a90bf6..80e41a1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
@@ -41,12 +41,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.junit.Assert.assertNotEquals;
/**
* Tests that cache value is copied for get, interceptor and invoke closure.
*/
+@RunWith(JUnit4.class)
public abstract class GridCacheOnCopyFlagAbstractSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -117,6 +121,7 @@ public abstract class GridCacheOnCopyFlagAbstractSelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testCopyOnReadFlagP2PEnabled() throws Exception {
doTest(true);
}
@@ -124,6 +129,7 @@ public abstract class GridCacheOnCopyFlagAbstractSelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testCopyOnReadFlagP2PDisbaled() throws Exception {
doTest(false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java
index 34b5876..42b26f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java
@@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -43,6 +46,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC;
/**
* Checks ordered preloading.
*/
+@RunWith(JUnit4.class)
public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -125,6 +129,7 @@ public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPreloadOrderPartitionedPartitioned() throws Exception {
checkPreloadOrder(PARTITIONED, PARTITIONED);
}
@@ -132,6 +137,7 @@ public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPreloadOrderReplicatedReplicated() throws Exception {
checkPreloadOrder(REPLICATED, REPLICATED);
}
@@ -139,6 +145,7 @@ public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPreloadOrderPartitionedReplicated() throws Exception {
checkPreloadOrder(PARTITIONED, REPLICATED);
}
@@ -146,6 +153,7 @@ public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPreloadOrderReplicatedPartitioned() throws Exception {
checkPreloadOrder(REPLICATED, PARTITIONED);
}
@@ -203,4 +211,4 @@ public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest {
private int gridIdx(Event evt) {
return getTestIgniteInstanceIndex((String)evt.node().attributes().get(GRID_NAME_ATTR));
}
-}
\ 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/GridCacheP2PUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java
index 6566874..79e6eb1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.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;
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;
@@ -48,6 +51,7 @@ import static org.apache.ignite.configuration.DeploymentMode.SHARED;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
/** Test p2p value. */
private static final String TEST_VALUE = "org.apache.ignite.tests.p2p.GridCacheDeploymentTestValue3";
@@ -118,6 +122,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSwapP2PReplicated() throws Exception {
offheap = false;
@@ -125,6 +130,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testOffHeapP2PReplicated() throws Exception {
offheap = true;
@@ -132,6 +138,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSwapP2PPartitioned() throws Exception {
offheap = false;
@@ -139,6 +146,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testOffheapP2PPartitioned() throws Exception {
offheap = true;
@@ -146,6 +154,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSwapP2PReplicatedNoPreloading() throws Exception {
mode = NONE;
offheap = false;
@@ -154,6 +163,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testOffHeapP2PReplicatedNoPreloading() throws Exception {
mode = NONE;
offheap = true;
@@ -162,6 +172,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSwapP2PPartitionedNoPreloading() throws Exception {
mode = NONE;
offheap = false;
@@ -170,6 +181,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testOffHeapP2PPartitionedNoPreloading() throws Exception {
mode = NONE;
offheap = true;
@@ -296,4 +308,4 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
return cache.localSize() == 0;
}
-}
\ 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/GridCachePartitionedGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
index f4c32ee..83880c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
@@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
@@ -44,6 +47,7 @@ import static org.apache.ignite.internal.GridTopic.TOPIC_CACHE;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -110,6 +114,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetFromPrimaryNode() throws Exception {
for (int i = 0; i < GRID_CNT; i++) {
IgniteCache<String, Integer> c = grid(i).cache(DEFAULT_CACHE_NAME);
@@ -129,6 +134,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetFromBackupNode() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-10274");
@@ -165,6 +171,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetFromNearNode() throws Exception {
for (int i = 0; i < GRID_CNT; i++) {
IgniteCache<String, Integer> c = grid(i).cache(DEFAULT_CACHE_NAME);
@@ -240,4 +247,4 @@ public class GridCachePartitionedGetSelfTest 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/GridCachePartitionedProjectionAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
index a41f999..efe481c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java
@@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -36,6 +39,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
/**
* Partitioned affinity test for projections.
*/
+@RunWith(JUnit4.class)
public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAbstractTest {
/** Backup count. */
private static final int BACKUPS = 1;
@@ -80,6 +84,7 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb
}
/** @throws Exception If failed. */
+ @Test
public void testAffinity() throws Exception {
waitTopologyUpdate();
@@ -91,6 +96,7 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb
}
/** @throws Exception If failed. */
+ @Test
public void testProjectionAffinity() throws Exception {
waitTopologyUpdate();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java
index a0c1669..9e4f251 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java
@@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -39,15 +42,14 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
* wrapped only in near cache (see {@link GridCacheProcessor} init logic).
*/
@SuppressWarnings({"unchecked"})
+@RunWith(JUnit4.class)
public class GridCachePartitionedWritesTest extends GridCommonAbstractTest {
/** Cache store. */
private CacheStore store;
/** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
+ @Override protected void beforeTest() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
-
- super.beforeTestsStarted();
}
/** {@inheritDoc} */
@@ -86,6 +88,7 @@ public class GridCachePartitionedWritesTest extends GridCommonAbstractTest {
}
/** @throws Exception If test fails. */
+ @Test
public void testWrite() throws Exception {
final AtomicInteger putCnt = new AtomicInteger();
final AtomicInteger rmvCnt = new AtomicInteger();
@@ -151,4 +154,4 @@ public class GridCachePartitionedWritesTest extends GridCommonAbstractTest {
stopGrid();
}
}
-}
\ No newline at end of file
+}