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:23 UTC
[36/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/GridProjectionForCachesOnDaemonNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
index 85b2373..759c35b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
@@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests of cache related cluster projections for daemon node.
*/
+@RunWith(JUnit4.class)
public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstractTest {
/** Ip finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -89,6 +93,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
/**
* @throws Exception If failed.
*/
+ @Test
public void testForDataNodes() throws Exception {
ClusterGroup grp = ignite.cluster().forDataNodes(DEFAULT_CACHE_NAME);
@@ -107,6 +112,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
/**
* @throws Exception If failed.
*/
+ @Test
public void testForClientNodes() throws Exception {
ClusterGroup grp = ignite.cluster().forClientNodes(DEFAULT_CACHE_NAME);
@@ -125,6 +131,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
/**
* @throws Exception If failed.
*/
+ @Test
public void testForCacheNodes() throws Exception {
ClusterGroup grp = ignite.cluster().forCacheNodes(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/IgniteAbstractDynamicCacheStartFailTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java
index d506224..ee3a8e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java
@@ -67,10 +67,14 @@ import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.resources.IgniteInstanceResource;
import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests the recovery after a dynamic cache start failure.
*/
+@RunWith(JUnit4.class)
public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheAbstractSelfTest {
/** */
private static final String DYNAMIC_CACHE_NAME = "TestDynamicCache";
@@ -107,6 +111,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* @throws Exception If failed.
*/
+ @Test
public void testBrokenAffinityFunStartOnServerFailedOnClient() throws Exception {
final String clientName = CLIENT_GRID_NAME + "testBrokenAffinityFunStartOnServerFailedOnClient";
@@ -135,6 +140,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* @throws Exception If failed.
*/
+ @Test
public void testBrokenAffinityFunStartOnServerFailedOnServer() throws Exception {
final String clientName = CLIENT_GRID_NAME + "testBrokenAffinityFunStartOnServerFailedOnServer";
@@ -164,6 +170,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* @throws Exception If failed.
*/
+ @Test
public void testBrokenAffinityFunStartOnClientFailOnServer() throws Exception {
final String clientName = CLIENT_GRID_NAME + "testBrokenAffinityFunStartOnClientFailOnServer";
@@ -193,6 +200,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Test cache start with broken affinity function that throws an exception on all nodes.
*/
+ @Test
public void testBrokenAffinityFunOnAllNodes() {
final boolean failOnAllNodes = true;
final int unluckyNode = 0;
@@ -209,6 +217,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Test cache start with broken affinity function that throws an exception on initiator node.
*/
+ @Test
public void testBrokenAffinityFunOnInitiator() {
final boolean failOnAllNodes = false;
final int unluckyNode = 1;
@@ -225,6 +234,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Test cache start with broken affinity function that throws an exception on non-initiator node.
*/
+ @Test
public void testBrokenAffinityFunOnNonInitiator() {
final boolean failOnAllNodes = false;
final int unluckyNode = 1;
@@ -241,6 +251,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Test cache start with broken affinity function that throws an exception on coordinator node.
*/
+ @Test
public void testBrokenAffinityFunOnCoordinatorDiffInitiator() {
final boolean failOnAllNodes = false;
final int unluckyNode = crdIdx;
@@ -257,6 +268,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Test cache start with broken affinity function that throws an exception on initiator node.
*/
+ @Test
public void testBrokenAffinityFunOnCoordinator() {
final boolean failOnAllNodes = false;
final int unluckyNode = crdIdx;
@@ -273,6 +285,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start with node filter and broken affinity function that throws an exception on initiator node.
*/
+ @Test
public void testBrokenAffinityFunWithNodeFilter() {
final boolean failOnAllNodes = false;
final int unluckyNode = 0;
@@ -289,6 +302,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start with broken cache store that throws an exception on all nodes.
*/
+ @Test
public void testBrokenCacheStoreOnAllNodes() {
final boolean failOnAllNodes = true;
final int unluckyNode = 0;
@@ -305,6 +319,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start with broken cache store that throws an exception on initiator node.
*/
+ @Test
public void testBrokenCacheStoreOnInitiator() {
final boolean failOnAllNodes = false;
final int unluckyNode = 1;
@@ -321,6 +336,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start that throws an Ignite checked exception on initiator node.
*/
+ @Test
public void testThrowsIgniteCheckedExceptionOnInitiator() {
final int unluckyNode = 1;
final int unluckyCfg = 1;
@@ -335,6 +351,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start with broken cache store that throws an exception on non-initiator node.
*/
+ @Test
public void testBrokenCacheStoreOnNonInitiator() {
final boolean failOnAllNodes = false;
final int unluckyNode = 1;
@@ -351,6 +368,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start that throws an Ignite checked exception on non-initiator node.
*/
+ @Test
public void testThrowsIgniteCheckedExceptionOnNonInitiator() {
final int unluckyNode = 1;
final int unluckyCfg = 1;
@@ -365,6 +383,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start with broken cache store that throws an exception on initiator node.
*/
+ @Test
public void testBrokenCacheStoreOnCoordinatorDiffInitiator() {
final boolean failOnAllNodes = false;
final int unluckyNode = crdIdx;
@@ -382,6 +401,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
* Tests cache start that throws an Ignite checked exception on coordinator node
* that doesn't initiator node.
*/
+ @Test
public void testThrowsIgniteCheckedExceptionOnCoordinatorDiffInitiator() {
final int unluckyNode = crdIdx;
final int unluckyCfg = 1;
@@ -396,6 +416,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start with broken cache store that throws an exception on coordinator node.
*/
+ @Test
public void testBrokenCacheStoreFunOnCoordinator() {
final boolean failOnAllNodes = false;
final int unluckyNode = crdIdx;
@@ -412,6 +433,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests cache start that throws an Ignite checked exception on coordinator node.
*/
+ @Test
public void testThrowsIgniteCheckedExceptionOnCoordinator() {
final int unluckyNode = crdIdx;
final int unluckyCfg = 1;
@@ -426,6 +448,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
/**
* Tests multiple creation of cache with broken affinity function.
*/
+ @Test
public void testCreateCacheMultipleTimes() {
final boolean failOnAllNodes = false;
final int unluckyNode = 1;
@@ -451,6 +474,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
*
* @throws Exception If test failed.
*/
+ @Test
public void testCacheStartAfterFailure() throws Exception {
CacheConfiguration cfg = createCacheConfigsWithBrokenAffinityFun(
false, 1, 0, 1, false).get(0);
@@ -473,6 +497,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
*
* @throws Exception If test failed.
*/
+ @Test
public void testExistingCacheAfterFailure() throws Exception {
IgniteCache<Integer, Value> cache = grid(0).getOrCreateCache(createCacheConfiguration(EXISTING_CACHE_NAME));
@@ -494,6 +519,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
*
* @throws Exception If test failed.
*/
+ @Test
public void testTopologyChangesAfterFailure() throws Exception {
final String clientName = "testTopologyChangesAfterFailure";
@@ -551,6 +577,7 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
checkCacheOperations(clientNode.cache(EXISTING_CACHE_NAME));
}
+ @Test
public void testConcurrentClientNodeJoins() throws Exception {
final int clientCnt = 3;
final int numberOfAttempts = 5;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
index 8774932..1e7ff0b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
@@ -52,6 +52,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -59,6 +62,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
*
*/
+@RunWith(JUnit4.class)
public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbstractTest {
/** */
public static final int CLN_GRD = 0;
@@ -165,6 +169,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testPut() throws Exception {
executeTest(new Callable<Integer>() {
/** {@inheritDoc} */
@@ -183,6 +188,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemove() throws Exception {
executeTest(new Callable<Integer>() {
/** {@inheritDoc} */
@@ -201,6 +207,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutAsync() throws Exception {
executeTest(new Callable<Object>() {
/** {@inheritDoc} */
@@ -219,6 +226,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testGet() throws Exception {
bannedMsg.set(GridNearSingleGetRequest.class);
@@ -239,6 +247,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAll() throws Exception {
bannedMsg.set(GridNearGetRequest.class);
@@ -302,6 +311,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutBatch() throws Exception {
assert !suspended.get();
@@ -406,4 +416,4 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
info("Grid stopped.");
}
}
-}
\ 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/IgniteCacheAtomicStopBusySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java
index 281397a..58ab3bb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java
@@ -19,10 +19,14 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateRequest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Stopped node when client operations are executing.
*/
+@RunWith(JUnit4.class)
public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBusySelfTest {
/** {@inheritDoc} */
@Override protected CacheAtomicityMode atomicityMode() {
@@ -30,6 +34,7 @@ public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBu
}
/** {@inheritDoc} */
+ @Test
@Override public void testPut() throws Exception {
bannedMsg.set(GridNearAtomicSingleUpdateRequest.class);
@@ -37,6 +42,7 @@ public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBu
}
/** {@inheritDoc} */
+ @Test
@Override public void testPutBatch() throws Exception {
bannedMsg.set(GridNearAtomicSingleUpdateRequest.class);
@@ -44,6 +50,7 @@ public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBu
}
/** {@inheritDoc} */
+ @Test
@Override public void testPutAsync() throws Exception {
bannedMsg.set(GridNearAtomicSingleUpdateRequest.class);
@@ -51,9 +58,10 @@ public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBu
}
/** {@inheritDoc} */
+ @Test
@Override public void testRemove() throws Exception {
bannedMsg.set(GridNearAtomicSingleUpdateRequest.class);
super.testPut();
}
-}
\ 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/IgniteCacheBinaryEntryProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
index 963fe88..f3cb6bb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java
@@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -88,6 +92,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
/**
* @throws Exception If failed.
*/
+ @Test
public void testPartitionedTransactional() throws Exception {
checkInvokeBinaryObject(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL);
}
@@ -95,6 +100,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
/**
* @throws Exception If failed.
*/
+ @Test
public void testReplicatedTransactional() throws Exception {
checkInvokeBinaryObject(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL);
}
@@ -102,6 +108,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
/**
* @throws Exception If failed.
*/
+ @Test
public void testPartitionedAtomic() throws Exception {
checkInvokeBinaryObject(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL);
}
@@ -109,6 +116,7 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT
/**
* @throws Exception If failed.
*/
+ @Test
public void testReplicatedAtomic() throws Exception {
checkInvokeBinaryObject(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java
index 3440290..2fba2b8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java
@@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class IgniteCacheBinaryObjectsScanSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -119,6 +123,7 @@ public class IgniteCacheBinaryObjectsScanSelfTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testScanNoClasses() throws Exception {
Ignite client = grid("client");
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
index d723b7d..30357a1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
@@ -88,6 +88,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;
@@ -114,6 +117,7 @@ import static org.apache.ignite.transactions.TransactionState.COMMITTED;
* Full API cache test.
*/
@SuppressWarnings({"unchecked"})
+@RunWith(JUnit4.class)
public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVariationsAbstractTest {
/** Test timeout */
private static final long TEST_TIMEOUT = 60 * 1000;
@@ -168,6 +172,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testSize() throws Exception {
assert jcache().localSize() == 0;
@@ -271,6 +276,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testContainsKey() throws Exception {
Map<String, Integer> vals = new HashMap<>();
@@ -292,6 +298,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testContainsKeyTx() throws Exception {
if (!txEnabled())
return;
@@ -326,6 +333,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testContainsKeysTx() throws Exception {
if (!txEnabled())
return;
@@ -367,6 +375,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemoveInExplicitLocks() throws Exception {
if (lockingEnabled()) {
IgniteCache<String, Integer> cache = jcache();
@@ -392,6 +401,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemoveAllSkipStore() throws Exception {
if (!storeEnabled())
return;
@@ -410,6 +420,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws IgniteCheckedException If failed.
*/
+ @Test
public void testAtomicOps() throws IgniteCheckedException {
IgniteCache<String, Integer> c = jcache();
@@ -442,6 +453,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGet() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() {
@@ -461,6 +473,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -489,6 +502,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -509,6 +523,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAll() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() {
@@ -600,6 +615,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAllWithNulls() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -620,6 +636,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetTxNonExistingKey() throws Exception {
if (txShouldBeUsed()) {
try (Transaction ignored = transactions().txStart()) {
@@ -631,6 +648,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAllAsyncOld() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -662,6 +680,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAllAsync() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -689,6 +708,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPut() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -734,6 +754,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutTx() throws Exception {
if (txShouldBeUsed()) {
IgniteCache<String, Integer> cache = jcache();
@@ -773,6 +794,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeOptimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -784,6 +806,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeOptimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -795,6 +818,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokePessimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -806,6 +830,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokePessimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -817,6 +842,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testIgniteInvokeOptimisticReadCommitted1() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -828,6 +854,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testIgniteInvokeOptimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -839,6 +866,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testIgniteInvokePessimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -850,6 +878,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testIgniteInvokePessimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -945,6 +974,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllOptimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -956,6 +986,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllOptimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -967,6 +998,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllPessimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -978,6 +1010,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllPessimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -989,6 +1022,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllAsyncOptimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1000,6 +1034,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllAsyncOptimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1011,6 +1046,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllAsyncPessimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1022,6 +1058,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllAsyncPessimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1225,6 +1262,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAllWithNulls() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1277,6 +1315,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeSequentialOptimisticNoStart() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1288,6 +1327,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeSequentialPessimisticNoStart() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1299,6 +1339,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeSequentialOptimisticWithStart() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1310,6 +1351,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeSequentialPessimisticWithStart() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1374,6 +1416,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAfterRemoveOptimistic() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1385,6 +1428,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAfterRemovePessimistic() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1427,6 +1471,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeReturnValueGetOptimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1438,6 +1483,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeReturnValueGetOptimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1449,6 +1495,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeReturnValueGetPessimisticReadCommitted() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1460,6 +1507,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeReturnValueGetPessimisticRepeatableRead() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1471,6 +1519,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeReturnValuePutInTx() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1524,6 +1573,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAndPutAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -1550,6 +1600,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAndPutAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -1570,6 +1621,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutAsyncOld0() throws Exception {
IgniteCache cacheAsync = jcache().withAsync();
@@ -1588,6 +1640,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutAsync0() throws Exception {
IgniteFuture<?> fut1 = jcache().getAndPutAsync("key1", 0);
@@ -1600,6 +1653,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAsyncOld() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1647,6 +1701,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAsync() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1687,6 +1742,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvoke() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -1741,6 +1797,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutx() throws Exception {
if (txShouldBeUsed())
checkPut(true);
@@ -1749,6 +1806,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutxNoTx() throws Exception {
checkPut(false);
}
@@ -1793,6 +1851,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutAsyncOld() throws Exception {
Transaction tx = txShouldBeUsed() ? transactions().txStart() : null;
@@ -1838,6 +1897,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutAsync() throws Exception {
Transaction tx = txShouldBeUsed() ? transactions().txStart() : null;
@@ -1877,6 +1937,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutAll() throws Exception {
Map<String, Integer> map = F.asMap("key1", 1, "key2", 2);
@@ -1903,6 +1964,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testNullInTx() throws Exception {
if (!txShouldBeUsed())
return;
@@ -1994,6 +2056,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutAllWithNulls() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -2122,6 +2185,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutAllAsyncOld() throws Exception {
Map<String, Integer> map = F.asMap("key1", 1, "key2", 2);
@@ -2152,6 +2216,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutAllAsync() throws Exception {
Map<String, Integer> map = F.asMap("key1", 1, "key2", 2);
@@ -2176,6 +2241,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAndPutIfAbsent() throws Exception {
Transaction tx = txShouldBeUsed() ? transactions().txStart() : null;
@@ -2262,6 +2328,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAndPutIfAbsentAsyncOld() throws Exception {
Transaction tx = txShouldBeUsed() ? transactions().txStart() : null;
@@ -2343,6 +2410,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAndPutIfAbsentAsync() throws Exception {
Transaction tx = txShouldBeUsed() ? transactions().txStart() : null;
@@ -2412,6 +2480,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutIfAbsent() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -2466,6 +2535,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutxIfAbsentAsyncOld() throws Exception {
if (txShouldBeUsed())
checkPutxIfAbsentAsyncOld(true);
@@ -2474,6 +2544,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutxIfAbsentAsyncOldNoTx() throws Exception {
checkPutxIfAbsentAsyncOld(false);
}
@@ -2481,6 +2552,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutxIfAbsentAsync() throws Exception {
if (txShouldBeUsed())
checkPutxIfAbsentAsync(true);
@@ -2489,6 +2561,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutxIfAbsentAsyncNoTx() throws Exception {
checkPutxIfAbsentAsync(false);
}
@@ -2641,6 +2714,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutIfAbsentAsyncOldConcurrent() throws Exception {
IgniteCache cacheAsync = jcache().withAsync();
@@ -2659,6 +2733,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPutIfAbsentAsyncConcurrent() throws Exception {
IgniteCache cache = jcache();
@@ -2673,6 +2748,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAndReplace() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -2767,6 +2843,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testReplace() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -2824,6 +2901,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAndReplaceAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -2913,6 +2991,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAndReplaceAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -2984,6 +3063,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testReplacexAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3055,6 +3135,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testReplacexAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3114,6 +3195,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGetAndRemove() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3133,6 +3215,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
* @throws Exception If failed.
*/
@SuppressWarnings("serial")
+ @Test
public void testGetAndRemoveObject() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -3181,6 +3264,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetAndPutSerializableObject() throws Exception {
IgniteCache<String, SerializableObject> cache = ignite(0).cache(cacheName());
@@ -3205,6 +3289,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeletedEntriesFlag() throws Exception {
if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
final int cnt = 3;
@@ -3225,6 +3310,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemoveLoad() throws Exception {
if (!storeEnabled())
return;
@@ -3259,6 +3345,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3293,6 +3380,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3317,6 +3405,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemove() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3330,6 +3419,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemovexAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3351,6 +3441,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemovexAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3366,6 +3457,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGlobalRemoveAll() throws Exception {
globalRemoveAll(false, false);
}
@@ -3373,6 +3465,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGlobalRemoveAllAsyncOld() throws Exception {
globalRemoveAll(true, true);
}
@@ -3380,6 +3473,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testGlobalRemoveAllAsync() throws Exception {
globalRemoveAll(true, false);
}
@@ -3472,6 +3566,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAllWithNulls() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -3526,6 +3621,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAllDuplicates() throws Exception {
jcache().removeAll(ImmutableSet.of("key1", "key1", "key1"));
}
@@ -3533,6 +3629,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAllDuplicatesTx() throws Exception {
if (txShouldBeUsed()) {
try (Transaction tx = transactions().txStart()) {
@@ -3546,6 +3643,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAllEmpty() throws Exception {
jcache().removeAll();
}
@@ -3553,6 +3651,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAllAsyncOld() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3578,6 +3677,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testRemoveAllAsync() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3599,6 +3699,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testLoadAll() throws Exception {
if (!storeEnabled())
return;
@@ -3639,6 +3740,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testRemoveAfterClear() throws Exception {
IgniteEx ignite = grid(0);
@@ -3685,6 +3787,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testClear() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -3832,6 +3935,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearAll() throws Exception {
globalClearAll(false, false);
}
@@ -3839,6 +3943,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearAllAsyncOld() throws Exception {
globalClearAll(true, true);
}
@@ -3846,6 +3951,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearAllAsync() throws Exception {
globalClearAll(true, false);
}
@@ -3885,6 +3991,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
* @throws Exception In case of error.
*/
@SuppressWarnings("BusyWait")
+ @Test
public void testLockUnlock() throws Exception {
if (lockingEnabled()) {
final CountDownLatch lockCnt = new CountDownLatch(1);
@@ -3944,6 +4051,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
* @throws Exception In case of error.
*/
@SuppressWarnings("BusyWait")
+ @Test
public void testLockUnlockAll() throws Exception {
if (lockingEnabled()) {
IgniteCache<String, Integer> cache = jcache();
@@ -3999,6 +4107,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testPeek() throws Exception {
Ignite ignite = primaryIgnite("key");
IgniteCache<String, Integer> cache = ignite.cache(cacheName());
@@ -4015,6 +4124,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPeekTxRemoveOptimistic() throws Exception {
checkPeekTxRemove(OPTIMISTIC);
}
@@ -4022,6 +4132,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPeekTxRemovePessimistic() throws Exception {
checkPeekTxRemove(PESSIMISTIC);
}
@@ -4051,6 +4162,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPeekRemove() throws Exception {
IgniteCache<String, Integer> cache = primaryCache("key");
@@ -4063,6 +4175,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testEvictExpired() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -4120,6 +4233,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testPeekExpired() throws Exception {
final IgniteCache<String, Integer> c = jcache();
@@ -4155,6 +4269,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testPeekExpiredTx() throws Exception {
if (txShouldBeUsed()) {
final IgniteCache<String, Integer> c = jcache();
@@ -4185,6 +4300,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testTtlTx() throws Exception {
if (txShouldBeUsed())
checkTtl(true, false);
@@ -4193,6 +4309,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testTtlNoTx() throws Exception {
checkTtl(false, false);
}
@@ -4200,6 +4317,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testTtlNoTxOldEntry() throws Exception {
checkTtl(false, true);
}
@@ -4461,6 +4579,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testLocalEvict() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -4514,6 +4633,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* JUnit.
*/
+ @Test
public void testCacheProxy() {
IgniteCache<String, Integer> cache = jcache();
@@ -4525,6 +4645,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testCompactExpired() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
@@ -4558,6 +4679,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testOptimisticTxMissingKey() throws Exception {
if (txShouldBeUsed()) {
try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) {
@@ -4574,6 +4696,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testOptimisticTxMissingKeyNoCommit() throws Exception {
if (txShouldBeUsed()) {
try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) {
@@ -4588,6 +4711,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testOptimisticTxReadCommittedInTx() throws Exception {
checkRemovexInTx(OPTIMISTIC, READ_COMMITTED);
}
@@ -4595,6 +4719,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testOptimisticTxRepeatableReadInTx() throws Exception {
checkRemovexInTx(OPTIMISTIC, REPEATABLE_READ);
}
@@ -4602,6 +4727,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPessimisticTxReadCommittedInTx() throws Exception {
checkRemovexInTx(PESSIMISTIC, READ_COMMITTED);
}
@@ -4609,6 +4735,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPessimisticTxRepeatableReadInTx() throws Exception {
checkRemovexInTx(PESSIMISTIC, REPEATABLE_READ);
}
@@ -4661,6 +4788,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testPessimisticTxMissingKey() throws Exception {
if (txShouldBeUsed()) {
try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) {
@@ -4677,6 +4805,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
*
* @throws Exception If failed.
*/
+ @Test
public void testPessimisticTxMissingKeyNoCommit() throws Exception {
if (txShouldBeUsed()) {
try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) {
@@ -4691,6 +4820,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPessimisticTxRepeatableRead() throws Exception {
if (txShouldBeUsed()) {
try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
@@ -4704,6 +4834,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testPessimisticTxRepeatableReadOnUpdate() throws Exception {
if (txShouldBeUsed()) {
try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
@@ -4717,6 +4848,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception In case of error.
*/
+ @Test
public void testToMap() throws Exception {
IgniteCache<String, Integer> cache = jcache();
@@ -4874,6 +5006,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testIterator() throws Exception {
IgniteCache<Integer, Integer> cache = grid(0).cache(cacheName());
@@ -4901,6 +5034,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testIgniteCacheIterator() throws Exception {
IgniteCache<String, Integer> cache = jcache(0);
@@ -5091,6 +5225,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testLocalClearKey() throws Exception {
addKeys();
@@ -5142,6 +5277,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testLocalClearKeys() throws Exception {
Map<String, List<String>> keys = addKeys();
@@ -5213,6 +5349,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearKey() throws Exception {
testGlobalClearKey(false, false, Arrays.asList("key25"));
}
@@ -5220,6 +5357,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearKeyAsyncOld() throws Exception {
testGlobalClearKey(true, true, Arrays.asList("key25"));
}
@@ -5227,6 +5365,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearKeyAsync() throws Exception {
testGlobalClearKey(true, false, Arrays.asList("key25"));
}
@@ -5234,6 +5373,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearKeys() throws Exception {
testGlobalClearKey(false, false, Arrays.asList("key25", "key100", "key150"));
}
@@ -5241,6 +5381,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearKeysAsyncOld() throws Exception {
testGlobalClearKey(true, true, Arrays.asList("key25", "key100", "key150"));
}
@@ -5248,6 +5389,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGlobalClearKeysAsync() throws Exception {
testGlobalClearKey(true, false, Arrays.asList("key25", "key100", "key150"));
}
@@ -5314,6 +5456,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testWithSkipStore() throws Exception {
if (!storeEnabled())
return;
@@ -5526,6 +5669,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testWithSkipStoreRemoveAll() throws Exception {
if (atomicityMode() == TRANSACTIONAL || (atomicityMode() == ATOMIC && nearEnabled())) // TODO IGNITE-373.
return;
@@ -5570,6 +5714,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testWithSkipStoreTx() throws Exception {
if (txShouldBeUsed() && storeEnabled()) {
IgniteCache<String, Integer> cache = grid(0).cache(cacheName());
@@ -5857,6 +6002,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetOutTx() throws Exception {
checkGetOutTx(false, false);
}
@@ -5864,6 +6010,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetOutTxAsyncOld() throws Exception {
checkGetOutTx(true, true);
}
@@ -5871,6 +6018,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetOutTxAsync() throws Exception {
checkGetOutTx(true, false);
}
@@ -5968,6 +6116,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeException() throws Exception {
final IgniteCache cache = jcache();
@@ -5991,6 +6140,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testLockInsideTransaction() throws Exception {
if (txEnabled()) {
GridTestUtils.assertThrows(
@@ -6028,6 +6178,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testContinuousQuery() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
@@ -6091,6 +6242,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetEntry() throws Exception {
runInAllDataModes(new TestRunnable() {
@Override public void run() throws Exception {
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
index c1af11e..b880375 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
@@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstractTest {
/** */
private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -59,6 +63,7 @@ public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstr
/**
* @throws Exception If failed.
*/
+ @Test
public void testDefaultTemplate() throws Exception {
Ignite ignite = startGrid(0);
@@ -110,4 +115,4 @@ public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstr
assertEquals(name, cfg.getName());
assertEquals(expBackups, cfg.getBackups());
}
-}
\ 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/IgniteCacheConfigurationTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
index cad629d..1d458f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
@@ -35,12 +35,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.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;
/**
*
*/
+@RunWith(JUnit4.class)
public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest {
/** */
private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -102,6 +106,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testCreateFromTemplate() throws Exception {
addTemplate = true;
@@ -156,6 +161,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testGetOrCreateFromTemplate() throws Exception {
addTemplate = true;
@@ -233,6 +239,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testStartClientNodeFirst() throws Exception {
addTemplate = true;
clientMode = true;
@@ -259,6 +266,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testAddCacheConfigurationMultinode() throws Exception {
addTemplate = true;
@@ -306,6 +314,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoPartitionExchangeForTemplate() throws Exception{
final int GRID_CNT = 3;
@@ -355,6 +364,7 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testTemplateCleanup() throws Exception {
startGridsMultiThreaded(3);
@@ -447,4 +457,4 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
assertNull(ignite.cache(TEMPLATE3));
}
}
-}
\ 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/IgniteCacheContainsKeyAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java
index 7d98968..66259b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java
@@ -28,12 +28,16 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
/**
* Tests various scenarios for {@code containsKey()} method.
*/
+@RunWith(JUnit4.class)
public abstract class IgniteCacheContainsKeyAbstractSelfTest extends GridCacheAbstractSelfTest {
/**
* @return Number of grids to start.
@@ -76,6 +80,7 @@ public abstract class IgniteCacheContainsKeyAbstractSelfTest extends GridCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testDistributedContains() throws Exception {
String key = "1";
@@ -91,6 +96,7 @@ public abstract class IgniteCacheContainsKeyAbstractSelfTest extends GridCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testContainsInTx() throws Exception {
if (atomicityMode() == TRANSACTIONAL) {
String key = "1";
@@ -137,4 +143,4 @@ public abstract class IgniteCacheContainsKeyAbstractSelfTest extends GridCacheAb
return entry != 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/IgniteCacheContainsKeyAtomicTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java
index 981d245..7332468 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java
@@ -23,6 +23,9 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
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.REPLICATED;
@@ -31,6 +34,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
* Verifies that containsKey() works as expected on atomic cache.
*/
+@RunWith(JUnit4.class)
public class IgniteCacheContainsKeyAtomicTest extends GridCacheAbstractSelfTest {
/** Cache name. */
public static final String CACHE_NAME = "replicated";
@@ -53,6 +57,7 @@ public class IgniteCacheContainsKeyAtomicTest extends GridCacheAbstractSelfTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testContainsPutIfAbsent() throws Exception {
checkPutIfAbsent(false);
}
@@ -60,6 +65,7 @@ public class IgniteCacheContainsKeyAtomicTest extends GridCacheAbstractSelfTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testContainsPutIfAbsentAll() throws Exception {
checkPutIfAbsent(true);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
index baa5d7e..d4189e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java
@@ -20,10 +20,14 @@ package org.apache.ignite.internal.processors.cache;
import java.io.Serializable;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.configuration.CacheConfiguration;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public abstract class IgniteCacheCopyOnReadDisabledAbstractTest extends GridCacheAbstractSelfTest {
/** {@inheritDoc} */
@Override protected int gridCount() {
@@ -49,6 +53,7 @@ public abstract class IgniteCacheCopyOnReadDisabledAbstractTest extends GridCach
/**
* @throws Exception If failed.
*/
+ @Test
public void testCopyOnReadDisabled() throws Exception {
IgniteCache<TestKey, TestValue> cache = ignite(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/IgniteCacheCreateRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java
index e854451..b236c60 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java
@@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class IgniteCacheCreateRestartSelfTest extends GridCommonAbstractTest {
/** Cache name. */
private static final String CACHE_NAME = "partitioned";
@@ -70,6 +74,7 @@ public class IgniteCacheCreateRestartSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testStopOriginatingNode() throws Exception {
startGrids(NODES);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
index b1047ba..1a0c575 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java
@@ -29,10 +29,14 @@ import org.apache.ignite.internal.util.typedef.CI1;
import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
@@ -44,6 +48,7 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testStopStartCacheWithDataLoaderNoOverwrite() throws Exception {
checkStopStartCacheWithDataLoader(false);
}
@@ -51,6 +56,7 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testStopStartCacheWithDataLoaderOverwrite() throws Exception {
checkStopStartCacheWithDataLoader(true);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index 5e06933..b612c6b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -69,6 +69,9 @@ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.MvccFeatureChecker;
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 javax.cache.event.EventType.CREATED;
@@ -82,6 +85,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
*
*/
+@RunWith(JUnit4.class)
public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAbstractTest {
/** */
private static volatile List<CacheEntryEvent<?, ?>> evts;
@@ -160,6 +164,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testExceptionIgnored() throws Exception {
CacheEntryListenerConfiguration<Object, Object> lsnrCfg = new MutableCacheEntryListenerConfiguration<>(
new Factory<CacheEntryListener<Object, Object>>() {
@@ -219,6 +224,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoOldValue() throws Exception {
CacheEntryListenerConfiguration<Object, Object> lsnrCfg = new MutableCacheEntryListenerConfiguration<>(
new Factory<CacheEntryListener<Object, Object>>() {
@@ -250,6 +256,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testSynchronousEventsObjectKeyValue() throws Exception {
useObjects = true;
@@ -259,6 +266,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testSynchronousEvents() throws Exception {
final CacheEntryCreatedListener<Object, Object> lsnr = new CreateUpdateRemoveExpireListener() {
@Override public void onRemoved(Iterable<CacheEntryEvent<?, ?>> evts) {
@@ -356,6 +364,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testSynchronousEventsListenerNodeFailed() throws Exception {
if (cacheMode() != PARTITIONED)
return;
@@ -410,6 +419,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testConcurrentRegisterDeregister() throws Exception {
final int THREADS = 10;
@@ -446,6 +456,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testSerialization() throws Exception {
if (cacheMode() == LOCAL)
return;
@@ -549,6 +560,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testEventsObjectKeyValue() throws Exception {
useObjects = true;
@@ -558,6 +570,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
/**
* @throws Exception If failed.
*/
+ @Test
public void testEvents() throws Exception {
IgniteCache<Object, Object> cache = jcache();