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:28:59 UTC
[12/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/store/IgnteCacheClientWriteBehindStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java
index 23bb781..25be9d2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java
@@ -29,10 +29,14 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest;
import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests that write behind store is updated if client does not have store.
*/
+@RunWith(JUnit4.class)
public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends IgniteCacheAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
@@ -42,6 +46,11 @@ public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends Ignit
}
/** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+ }
+
+ /** {@inheritDoc} */
@Override protected int gridCount() {
return 3;
}
@@ -91,6 +100,7 @@ public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends Ignit
/**
* @throws Exception If failed.
*/
+ @Test
public void testClientWithoutStore() throws Exception {
Ignite client = grid(2);
@@ -111,4 +121,4 @@ public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends Ignit
assertEquals(1000, storeMap.size());
}
-}
\ 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/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java
index dd8d810..410db2f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java
@@ -37,12 +37,16 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest;
import org.apache.ignite.lang.IgniteBiInClosure;
import org.apache.ignite.lang.IgniteFuture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
/**
* This class provides non write coalescing tests for {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore}.
*/
+@RunWith(JUnit4.class)
public class IgnteCacheClientWriteBehindStoreNonCoalescingTest extends IgniteCacheAbstractTest {
/** {@inheritDoc} */
@Override protected int gridCount() {
@@ -80,6 +84,7 @@ public class IgnteCacheClientWriteBehindStoreNonCoalescingTest extends IgniteCac
/**
* @throws Exception If failed.
*/
+ @Test
public void testNonCoalescingIncrementing() throws Exception {
Ignite ignite = grid(0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java
index b58dbe0..e02ca25 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java
@@ -32,6 +32,9 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CachePeekMode.ALL;
@@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CachePeekMode.ALL;
/**
* Checks how operations under atomic cache works inside a transaction.
*/
+@RunWith(JUnit4.class)
public class AtomicOperationsInTxTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
@@ -71,6 +75,7 @@ public class AtomicOperationsInTxTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testEnablingAtomicOperationDuringTransaction() throws Exception {
GridTestUtils.assertThrows(log, (Callable<IgniteCache>)() -> {
try (Transaction tx = grid(0).transactions().txStart()) {
@@ -85,6 +90,7 @@ public class AtomicOperationsInTxTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testAllowedAtomicOperations() throws Exception {
checkOperations(true);
}
@@ -92,6 +98,7 @@ public class AtomicOperationsInTxTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNotAllowedAtomicOperations() throws Exception {
checkOperations(false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java
index 3d1064c..4fec1ab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java
@@ -30,12 +30,16 @@ import junit.framework.TestCase;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.U;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.internal.processors.cache.transactions.TxDeadlockDetection.findCycle;
/**
* DFS test for search cycle in wait-for-graph.
*/
+@RunWith(JUnit4.class)
public class DepthFirstSearchTest extends TestCase {
/** Tx 1. */
private static final GridCacheVersion T1 = new GridCacheVersion(1, 0, 0);
@@ -62,6 +66,7 @@ public class DepthFirstSearchTest extends TestCase {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoCycle() throws Exception {
assertNull(findCycle(Collections.<GridCacheVersion, Set<GridCacheVersion>>emptyMap(), T1));
@@ -115,6 +120,7 @@ public class DepthFirstSearchTest extends TestCase {
/**
* @throws Exception If failed.
*/
+ @Test
public void testFindCycle2() throws Exception {
Map<GridCacheVersion, Set<GridCacheVersion>> wfg = new HashMap<GridCacheVersion, Set<GridCacheVersion>>() {{
put(T1, Collections.singleton(T2));
@@ -180,6 +186,7 @@ public class DepthFirstSearchTest extends TestCase {
/**
* @throws Exception If failed.
*/
+ @Test
public void testFindCycle3() throws Exception {
Map<GridCacheVersion, Set<GridCacheVersion>> wfg = new HashMap<GridCacheVersion, Set<GridCacheVersion>>() {{
put(T1, Collections.singleton(T2));
@@ -240,6 +247,7 @@ public class DepthFirstSearchTest extends TestCase {
/**
* @throws Exception If failed.
*/
+ @Test
public void testFindCycle4() throws Exception {
Map<GridCacheVersion, Set<GridCacheVersion>> wfg = new HashMap<GridCacheVersion, Set<GridCacheVersion>>() {{
put(T1, Collections.singleton(T2));
@@ -255,6 +263,7 @@ public class DepthFirstSearchTest extends TestCase {
/**
* @throws Exception If failed.
*/
+ @Test
public void testRandomNoExceptions() throws Exception {
int maxNodesCnt = 100;
int minNodesCnt = 10;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
index 616bf97..486ae22 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
@@ -34,6 +34,9 @@ import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO;
import org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler;
import org.apache.ignite.internal.processors.cache.tree.SearchRow;
import org.apache.ignite.testframework.GridTestUtils;
+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.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING;
@@ -41,6 +44,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.topolo
/**
* Test cases that check transaction data integrity after transaction commit failed.
*/
+@RunWith(JUnit4.class)
public class TransactionIntegrityWithPrimaryIndexCorruptionTest extends AbstractTransactionIntergrityTest {
/** Corruption enabled flag. */
private static volatile boolean corruptionEnabled;
@@ -61,61 +65,73 @@ public class TransactionIntegrityWithPrimaryIndexCorruptionTest extends Abstract
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitPrimaryColocatedThrowsError() throws Exception {
doTestTransferAmount0(true, true, () -> new AssertionError("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitPrimaryColocatedThrowsUnchecked() throws Exception {
doTestTransferAmount0(true, true, () -> new RuntimeException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitPrimaryColocatedThrowsChecked() throws Exception {
doTestTransferAmount0(true, true, () -> new IgniteCheckedException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitPrimaryNonColocatedThrowsError() throws Exception {
doTestTransferAmount0(false, true, () -> new AssertionError("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitPrimaryNonColocatedThrowsUnchecked() throws Exception {
doTestTransferAmount0(false, true, () -> new RuntimeException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitPrimaryNonColocatedThrowsChecked() throws Exception {
doTestTransferAmount0(false, true, () -> new IgniteCheckedException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitBackupColocatedThrowsError() throws Exception {
doTestTransferAmount0(true, false, () -> new AssertionError("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitBackupColocatedThrowsUnchecked() throws Exception {
doTestTransferAmount0(true, false, () -> new RuntimeException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitBackupColocatedThrowsChecked() throws Exception {
doTestTransferAmount0(true, false, () -> new IgniteCheckedException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitBackupNonColocatedThrowsError() throws Exception {
doTestTransferAmount0(false, false, () -> new AssertionError("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitBackupNonColocatedThrowsUnchecked() throws Exception {
doTestTransferAmount0(false, false, () -> new RuntimeException("Test"));
}
/** */
+ @Test
public void testPrimaryIndexCorruptionDuringCommitBackupNonColocatedThrowsChecked() throws Exception {
doTestTransferAmount0(false, false, () -> new IgniteCheckedException("Test"));
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java
index 551335f..a4dd7c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java
@@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.worker.WorkersControlMXBeanImpl;
import org.apache.ignite.mxbean.WorkersControlMXBean;
import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class TransactionIntegrityWithSystemWorkerDeathTest extends AbstractTransactionIntergrityTest {
/** {@inheritDoc}. */
@Override protected long getTestTimeout() {
@@ -42,6 +46,7 @@ public class TransactionIntegrityWithSystemWorkerDeathTest extends AbstractTrans
}
/** */
+ @Test
public void testFailoverWithDiscoWorkerTermination() throws Exception {
doTestTransferAmount(new FailoverScenario() {
static final int failedNodeIdx = 1;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java
index 881c680..4c88fad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java
@@ -38,6 +38,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 org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@@ -45,6 +48,7 @@ import org.mockito.stubbing.Answer;
/**
* Tests data consistency if transaction is failed due to heuristic exception on originating node.
*/
+@RunWith(JUnit4.class)
public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest {
/** */
public static final int KEY = 0;
@@ -81,6 +85,7 @@ public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest
}
/** */
+ @Test
public void testCommitErrorOnNearNode2PC() throws Exception {
nodesCnt = 3;
@@ -97,6 +102,7 @@ public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest
}
/** */
+ @Test
public void testCommitErrorOnNearNode1PC() throws Exception {
nodesCnt = 2;
@@ -114,6 +120,7 @@ public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest
/** */
@IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-9806", forceFailure = false)
+ @Test
public void testCommitErrorOnColocatedNode2PC() throws Exception {
nodesCnt = 3;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java
index 8f5ee30..714154a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java
@@ -40,10 +40,14 @@ import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class TxDeadlockCauseTest extends GridCommonAbstractTest {
/** */
private CacheConfiguration ccfg;
@@ -84,6 +88,7 @@ public class TxDeadlockCauseTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCause() throws Exception {
startGrids(1);
@@ -96,6 +101,7 @@ public class TxDeadlockCauseTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCauseSeveralNodes() throws Exception {
startGrids(2);
@@ -108,6 +114,7 @@ public class TxDeadlockCauseTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCauseNear() throws Exception {
ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME)
.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
@@ -124,6 +131,7 @@ public class TxDeadlockCauseTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCauseSeveralNodesNear() throws Exception {
ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME)
.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
@@ -146,6 +154,7 @@ public class TxDeadlockCauseTest extends GridCommonAbstractTest {
* instead of {@link IgniteCache#get(java.lang.Object)} and {@link IgniteCache#put(java.lang.Object, java.lang.Object)} operations sequence.
* @throws Exception If failed.
*/
+ @Test
public void testCauseObject(int nodes, final int keysCnt, final long timeout, final TransactionIsolation isolation, final boolean oneOp) throws Exception {
final Ignite ignite = grid(new Random().nextInt(nodes));
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java
index 1609f0e..9d22d68 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java
@@ -33,10 +33,14 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
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 TxDeadlockDetectionMessageMarshallingTest extends GridCommonAbstractTest {
/** Topic. */
private static final String TOPIC = "mytopic";
@@ -56,6 +60,7 @@ public class TxDeadlockDetectionMessageMarshallingTest extends GridCommonAbstrac
/**
* @throws Exception If failed.
*/
+ @Test
public void testMessageUnmarshallWithoutCacheContext() throws Exception {
try {
Ignite ignite = startGrid(0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
index 3f1639a..bffed6b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
@@ -35,6 +35,9 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_DEADLOCK_DETECTION_MAX_ITERS;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_DEADLOCK_DETECTION_TIMEOUT;
@@ -46,6 +49,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
*
*/
+@RunWith(JUnit4.class)
public class TxDeadlockDetectionNoHangsTest extends GridCommonAbstractTest {
/** Nodes count. */
private static final int NODES_CNT = 3;
@@ -105,6 +109,7 @@ public class TxDeadlockDetectionNoHangsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoHangsPessimistic() throws Exception {
assertTrue(grid(0).context().cache().context().tm().deadlockDetectionEnabled());
@@ -126,6 +131,7 @@ public class TxDeadlockDetectionNoHangsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoHangsOptimistic() throws Exception {
assertTrue(grid(0).context().cache().context().tm().deadlockDetectionEnabled());
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
index 6cf65c8..f9bd487 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
@@ -48,6 +48,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionTimeoutException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.internal.util.typedef.X.hasCause;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -56,6 +59,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
*
*/
+@RunWith(JUnit4.class)
public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
/** Nodes count. */
private static final int NODES_CNT = 3;
@@ -102,6 +106,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoHangs() throws Exception {
final AtomicBoolean stop = new AtomicBoolean();
@@ -182,6 +187,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoDeadlockSimple() throws Exception {
final AtomicInteger threadCnt = new AtomicInteger();
@@ -236,6 +242,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNoDeadlock() throws Exception {
for (int i = 2; i <= 10; i++) {
final int threads = i;
@@ -310,6 +317,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testFailedTxLocksRequest() throws Exception {
doTestFailedMessage(TxLocksRequest.class);
}
@@ -317,6 +325,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testFailedTxLocksResponse() throws Exception {
doTestFailedMessage(TxLocksResponse.class);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java
index 0cadafe..5b5dddb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java
@@ -38,6 +38,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionTimeoutException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.internal.util.typedef.X.hasCause;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -47,6 +50,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
*
*/
+@RunWith(JUnit4.class)
public class TxDeadlockDetectionUnmasrhalErrorsTest extends GridCommonAbstractTest {
/** Nodes count. */
private static final int NODES_CNT = 2;
@@ -86,6 +90,7 @@ public class TxDeadlockDetectionUnmasrhalErrorsTest extends GridCommonAbstractTe
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlockCacheObjectContext() throws Exception {
IgniteCache<Integer, Integer> cache0 = null;
IgniteCache<Integer, Integer> cache1 = null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java
index 50b107d..516c08a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java
@@ -20,10 +20,14 @@ package org.apache.ignite.internal.processors.cache.transactions;
import org.apache.ignite.Ignite;
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;
/**
* Tests transaction labels.
*/
+@RunWith(JUnit4.class)
public class TxLabelTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
@@ -42,6 +46,7 @@ public class TxLabelTest extends GridCommonAbstractTest {
/**
* Tests transaction labels.
*/
+ @Test
public void testLabel() {
testLabel0(grid(0), "lbl0");
testLabel0(grid(0), "lbl1");
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java
index 89f20ec..cca0bee 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java
@@ -26,6 +26,9 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.lang.IgniteFuture;
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.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -33,6 +36,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
*
*/
+@RunWith(JUnit4.class)
public class TxMultiCacheAsyncOpsTest extends GridCommonAbstractTest {
/** Grid count. */
public static final int GRID_COUNT = 3;
@@ -77,6 +81,7 @@ public class TxMultiCacheAsyncOpsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCommitAfterAsyncPut() {
CacheConfiguration[] caches = cacheConfigurations();
@@ -106,6 +111,7 @@ public class TxMultiCacheAsyncOpsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCommitAfterAsyncGet() {
CacheConfiguration[] caches = cacheConfigurations();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java
index 2404404..5f0ca1f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java
@@ -34,12 +34,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests transactions closes correctly while other caches start and stop.
* Tests possible {@link NullPointerException} in {@link TransactionProxyImpl#leave} due to race while
* {@link org.apache.ignite.internal.processors.cache.GridCacheTtlManager} initializes (IGNITE-7972).
*/
+@RunWith(JUnit4.class)
public class TxOnCachesStartTest extends GridCommonAbstractTest {
/** */
private static int NUM_CACHES = 100;
@@ -73,6 +77,7 @@ public class TxOnCachesStartTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testTransactionCloseOnCachesStartAndStop() throws Exception {
Ignite srv = startGrids(5);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java
index 056b093..680e69b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java
@@ -39,6 +39,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionTimeoutException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.internal.util.typedef.X.hasCause;
import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
@@ -47,6 +50,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
*
*/
+@RunWith(JUnit4.class)
public class TxOptimisticDeadlockDetectionCrossCacheTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@@ -83,6 +87,7 @@ public class TxOptimisticDeadlockDetectionCrossCacheTest extends GridCommonAbstr
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlock() throws Exception {
startGrids(2);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
index 182b1c2..04c27c3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
@@ -57,6 +57,9 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionTimeoutException;
+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;
@@ -69,6 +72,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
*
*/
+@RunWith(JUnit4.class)
public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetectionTest {
/** Ip finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -130,6 +134,7 @@ public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetection
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksPartitioned() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocks(createCache(PARTITIONED, syncMode, false), ORDINAL_START_KEY);
@@ -140,6 +145,7 @@ public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetection
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksPartitionedNear() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocks(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY);
@@ -150,6 +156,7 @@ public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetection
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksReplicated() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocks(createCache(REPLICATED, syncMode, false), ORDINAL_START_KEY);
@@ -160,6 +167,7 @@ public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetection
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksPartitionedNearTxOnPrimary() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocksTxOnPrimary(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java
index 369e755..9be8c7d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java
@@ -50,6 +50,9 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionIsolation;
+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;
@@ -65,6 +68,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
/**
*
*/
+@RunWith(JUnit4.class)
public class TxOptimisticOnPartitionExchangeTest extends GridCommonAbstractTest {
/** Nodes count. */
private static final int NODES_CNT = 3;
@@ -106,6 +110,7 @@ public class TxOptimisticOnPartitionExchangeTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testConsistencyOnPartitionExchange() throws Exception {
doTest(SERIALIZABLE, true);
doTest(READ_COMMITTED, true);
@@ -312,4 +317,4 @@ public class TxOptimisticOnPartitionExchangeTest extends GridCommonAbstractTest
super.sendMessage(node, msg, ackC);
}
}
-}
\ 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/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java
index cbdcffe..551d75e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java
@@ -38,6 +38,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -46,6 +49,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC
/**
* Tests optimistic prepare on unstable topology.
*/
+@RunWith(JUnit4.class)
public class TxOptimisticPrepareOnUnstableTopologyTest extends GridCommonAbstractTest {
/** */
public static final String CACHE_NAME = "part_cache";
@@ -90,6 +94,7 @@ public class TxOptimisticPrepareOnUnstableTopologyTest extends GridCommonAbstrac
/**
*
*/
+ @Test
public void testPrepareOnUnstableTopology() throws Exception {
for (TransactionIsolation isolation : TransactionIsolation.values()) {
doPrepareOnUnstableTopology(4, false, isolation, 0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java
index b6bd7fb..5a39755 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java
@@ -37,6 +37,9 @@ import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionTimeoutException;
import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.internal.util.typedef.X.hasCause;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -45,6 +48,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
*
*/
+@RunWith(JUnit4.class)
public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbstractTest {
/** Nodes count. */
private static final int NODES_CNT = 2;
@@ -75,6 +79,7 @@ public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlockNoNear() throws Exception {
doTestDeadlock(false, false);
}
@@ -82,6 +87,7 @@ public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlockOneNear() throws Exception {
doTestDeadlock(false, true);
}
@@ -89,6 +95,7 @@ public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlockAnotherNear() throws Exception {
doTestDeadlock(true, false);
doTestDeadlock(false, true);
@@ -97,6 +104,7 @@ public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbst
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlockBothNear() throws Exception {
doTestDeadlock(true, true);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
index 77d3725..507f9c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
@@ -48,6 +48,9 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionTimeoutException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheMode.LOCAL;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -61,6 +64,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Tests deadlock detection for pessimistic transactions.
*/
+@RunWith(JUnit4.class)
public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectionTest {
/** Cache name. */
private static final String CACHE_NAME = "cache";
@@ -118,6 +122,7 @@ public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectio
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksPartitioned() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocks(createCache(PARTITIONED, syncMode, false), ORDINAL_START_KEY);
@@ -128,6 +133,7 @@ public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectio
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksPartitionedNear() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocks(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY);
@@ -138,6 +144,7 @@ public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectio
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksReplicated() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
doTestDeadlocks(createCache(REPLICATED, syncMode, false), ORDINAL_START_KEY);
@@ -148,6 +155,7 @@ public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectio
/**
* @throws Exception If failed.
*/
+ @Test
public void testDeadlocksLocal() throws Exception {
for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
IgniteCache cache = null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
index dc115e1..8a5aad4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.processors.cache.transactions;
import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.junit.Before;
/**
* Tests an ability to async rollback near transactions.
@@ -29,6 +30,7 @@ public class TxRollbackAsyncNearCacheTest extends TxRollbackAsyncTest {
}
/** {@inheritDoc} */
+ @Before
@Override public void setUp() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
index c5989f9..b438ca9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.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.apache.ignite.transactions.TransactionRollbackException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static java.lang.Thread.interrupted;
import static java.lang.Thread.yield;
@@ -105,6 +108,7 @@ import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK;
/**
* Tests an ability to async rollback near transactions.
*/
+@RunWith(JUnit4.class)
public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/** */
public static final int DURATION = SF.applyLB(60_000, 5_000);
@@ -212,6 +216,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackSimple() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-7952");
@@ -319,6 +324,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testSynchronousRollback() throws Exception {
Ignite client = startClient();
@@ -469,6 +475,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEnlistManyRead() throws Exception {
testEnlistMany(false, REPEATABLE_READ, PESSIMISTIC);
}
@@ -476,6 +483,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEnlistManyWrite() throws Exception {
testEnlistMany(true, REPEATABLE_READ, PESSIMISTIC);
}
@@ -483,6 +491,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEnlistManyReadOptimistic() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
return; // Optimistic transactions are not supported by MVCC.
@@ -493,6 +502,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEnlistManyWriteOptimistic() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
return; // Optimistic transactions are not supported by MVCC.
@@ -540,6 +550,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
* Rollback tx while near lock request is delayed.
*/
+ @Test
public void testRollbackDelayNearLockRequest() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-9470");
@@ -587,6 +598,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
* Tests rollback with concurrent commit.
*/
+ @Test
public void testRollbackDelayFinishRequest() throws Exception {
final Ignite client = startClient();
@@ -646,6 +658,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testMixedAsyncRollbackTypes() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-10434");
@@ -831,6 +844,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
* Tests proxy object returned by {@link IgniteTransactions#localActiveTransactions()}
*/
+ @Test
public void testRollbackProxy() throws Exception {
final CountDownLatch keyLocked = new CountDownLatch(1);
@@ -919,6 +933,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTopologyLockPessimistic() throws Exception {
final Ignite client = startClient();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java
index 75b7625..2d886a4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java
@@ -33,24 +33,27 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.events.EventType.EVT_TX_STARTED;
/**
* Tests transaction rollback on incorrect tx params.
*/
+@RunWith(JUnit4.class)
public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
+ @Override protected void beforeTest() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-10415");
-
- super.beforeTestsStarted();
}
/**
*
*/
+ @Test
public void testTimeoutSetLocalGuarantee() throws Exception {
Ignite ignite = startGrid(0);
@@ -103,6 +106,7 @@ public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testLabelFilledLocalGuarantee() throws Exception {
Ignite ignite = startGrid(0);
@@ -142,6 +146,7 @@ public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testLabelFilledRemoteGuarantee() throws Exception {
Ignite ignite = startGrid(0);
Ignite remote = startGrid(1);
@@ -202,6 +207,7 @@ public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testTimeoutSetRemoteGuarantee() throws Exception {
Ignite ignite = startGrid(0);
Ignite remote = startGrid(1);
@@ -264,6 +270,7 @@ public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackInsideLocalListenerAfterRemoteFilter() throws Exception {
Ignite ignite = startGrid(0);
Ignite remote = startGrid(1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java
index 2375d9e..78c40cf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java
@@ -37,6 +37,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionTimeoutException;
+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.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -48,6 +51,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Tests rollback on timeout scenarios for one-phase commit protocol.
*/
+@RunWith(JUnit4.class)
public class TxRollbackOnTimeoutOnePhaseCommitTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -98,16 +102,19 @@ public class TxRollbackOnTimeoutOnePhaseCommitTest extends GridCommonAbstractTes
}
/** */
+ @Test
public void testRollbackOnTimeoutPartitionDesyncPessimistic() throws Exception {
doTestRollbackOnTimeoutPartitionDesync(PESSIMISTIC);
}
/** */
+ @Test
public void testRollbackOnTimeoutPartitionDesyncOptimistic() throws Exception {
doTestRollbackOnTimeoutPartitionDesync(OPTIMISTIC);
}
/** */
+ @Test
public void testUnlockOptimistic() throws IgniteCheckedException {
IgniteEx 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/transactions/TxRollbackOnTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
index 0ae15b0..ffa454b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
@@ -64,6 +64,9 @@ import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionDeadlockException;
import org.apache.ignite.transactions.TransactionIsolation;
import org.apache.ignite.transactions.TransactionTimeoutException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static java.lang.Thread.sleep;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -78,6 +81,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
/**
* Tests an ability to eagerly rollback timed out transactions.
*/
+@RunWith(JUnit4.class)
public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/** */
private static final long DURATION = SF.apply(60 * 1000);
@@ -95,14 +99,6 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
private static final int GRID_CNT = 3;
/** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- if (MvccFeatureChecker.forcedMvcc())
- fail("https://issues.apache.org/jira/browse/IGNITE-7388");
-
- super.beforeTestsStarted();
- }
-
- /** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -141,6 +137,9 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
+ if (MvccFeatureChecker.forcedMvcc())
+ fail("https://issues.apache.org/jira/browse/IGNITE-7388");
+
super.beforeTest();
startGridsMultiThreaded(GRID_CNT);
@@ -181,6 +180,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLockAndConcurrentTimeout() throws Exception {
startClient();
@@ -248,6 +248,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testWaitingTxUnblockedOnTimeout() throws Exception {
waitingTxUnblockedOnTimeout(grid(0), grid(0));
@@ -271,6 +272,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testWaitingTxUnblockedOnThreadDeath() throws Exception {
waitingTxUnblockedOnThreadDeath(grid(0), grid(0));
@@ -294,6 +296,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testDeadlockUnblockedOnTimeout() throws Exception {
deadlockUnblockedOnTimeout(ignite(0), ignite(1));
@@ -372,6 +375,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testTimeoutRemoval() throws Exception {
IgniteEx client = (IgniteEx)startClient();
@@ -403,6 +407,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSimple() throws Exception {
for (TransactionConcurrency concurrency : TransactionConcurrency.values())
for (TransactionIsolation isolation : TransactionIsolation.values()) {
@@ -414,6 +419,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
* Test timeouts with random values and different tx configurations.
*/
+ @Test
public void testRandomMixedTxConfigurations() throws Exception {
final Ignite client = startClient();
@@ -518,6 +524,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testTimeoutOnPrimaryDHTNode() throws Exception {
final ClusterNode n0 = grid(0).affinity(CACHE_NAME).mapKeyToNode(0);
@@ -532,6 +539,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testLockRelease() throws Exception {
final Ignite client = startClient();
@@ -593,6 +601,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEnlistManyRead() throws Exception {
testEnlistMany(false);
}
@@ -600,6 +609,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEnlistManyWrite() throws Exception {
testEnlistMany(true);
}
@@ -607,6 +617,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxRemapOptimisticReadCommitted() throws Exception {
doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, READ_COMMITTED, true);
}
@@ -614,6 +625,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxRemapOptimisticRepeatableRead() throws Exception {
doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, REPEATABLE_READ, true);
}
@@ -621,6 +633,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxRemapOptimisticSerializable() throws Exception {
doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, SERIALIZABLE, true);
}
@@ -628,6 +641,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxRemapPessimisticReadCommitted() throws Exception {
doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, READ_COMMITTED, true);
}
@@ -635,6 +649,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxRemapPessimisticRepeatableRead() throws Exception {
doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, REPEATABLE_READ, true);
}
@@ -642,6 +657,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxRemapPessimisticSerializable() throws Exception {
doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, SERIALIZABLE, true);
}
@@ -649,6 +665,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxServerRemapOptimisticReadCommitted() throws Exception {
doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, READ_COMMITTED, false);
}
@@ -656,6 +673,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxServerRemapOptimisticRepeatableRead() throws Exception {
doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, REPEATABLE_READ, false);
}
@@ -663,6 +681,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxServerRemapOptimisticSerializable() throws Exception {
doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, SERIALIZABLE, false);
}
@@ -670,6 +689,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxServerRemapPessimisticReadCommitted() throws Exception {
doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, READ_COMMITTED, false);
}
@@ -677,6 +697,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxServerRemapPessimisticRepeatableRead() throws Exception {
doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, REPEATABLE_READ, false);
}
@@ -684,6 +705,7 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRollbackOnTimeoutTxServerRemapPessimisticSerializable() throws Exception {
doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, SERIALIZABLE, false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java
index 1fb0376..88b09c6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java
@@ -37,6 +37,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 java.lang.Thread.yield;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -47,6 +50,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Tests an ability to rollback transactions on topology change.
*/
+@RunWith(JUnit4.class)
public class TxRollbackOnTopologyChangeTest extends GridCommonAbstractTest {
/** */
public static final int ROLLBACK_TIMEOUT = 500;
@@ -113,6 +117,7 @@ public class TxRollbackOnTopologyChangeTest extends GridCommonAbstractTest {
/**
* Tests rollbacks on topology change.
*/
+ @Test
public void testRollbackOnTopologyChange() throws Exception {
final AtomicBoolean stop = new AtomicBoolean();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java
index 446609f..c09569b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java
@@ -34,6 +34,9 @@ import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
import org.apache.ignite.transactions.TransactionState;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.events.EventType.EVTS_TX;
import static org.apache.ignite.events.EventType.EVT_TX_COMMITTED;
@@ -45,6 +48,7 @@ import static org.apache.ignite.events.EventType.EVT_TX_SUSPENDED;
/**
* Tests transaction state change event.
*/
+@RunWith(JUnit4.class)
public class TxStateChangeEventTest extends GridCommonAbstractTest {
/** Label. */
private final String lb = "testLabel";
@@ -70,6 +74,7 @@ public class TxStateChangeEventTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testLocal() throws Exception {
check(true);
}
@@ -77,6 +82,7 @@ public class TxStateChangeEventTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testRemote() throws Exception {
check(false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
index cac0427..4ca813b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
@@ -45,6 +45,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.testframework.GridTestUtils.runAsync;
import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync;
@@ -57,6 +60,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
/**
*
*/
+@RunWith(JUnit4.class)
public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstractTest {
/** */
public static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -156,6 +160,7 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac
*
* @throws Exception If failed.
*/
+ @Test
public void test() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-10455");
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
index 16ea848..7319705 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -28,10 +28,14 @@ import javax.cache.processor.MutableEntry;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheEntry;
import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Versioned entry abstract test.
*/
+@RunWith(JUnit4.class)
public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractSelfTest {
/** Entries number to store in a cache. */
private static final int ENTRIES_NUM = 500;
@@ -54,6 +58,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvoke() throws Exception {
Cache<Integer, String> cache = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -71,6 +76,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvokeAll() throws Exception {
Cache<Integer, String> cache = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -95,6 +101,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
/**
* @throws Exception If failed.
*/
+ @Test
public void testLocalPeek() throws Exception {
IgniteCache<Integer, String> cache = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -107,6 +114,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
/**
* @throws Exception If failed.
*/
+ @Test
public void testVersionComparision() throws Exception {
IgniteCache<Integer, String> cache = grid(0).cache(DEFAULT_CACHE_NAME);
@@ -142,4 +150,4 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
assertNotNull(entry.getKey());
assertNotNull(entry.getValue());
}
-}
\ 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/version/CacheVersionedEntryLocalTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
index b217703..81b018a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.version;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.junit.Before;
/**
*
@@ -41,10 +42,11 @@ public class CacheVersionedEntryLocalTransactionalSelfTest extends CacheVersione
}
/** {@inheritDoc} */
+ @Before
@Override public void setUp() throws Exception {
MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
super.setUp();
}
-}
\ 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/closure/GridClosureProcessorRemoteTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java
index 395cbc9..682d2e5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java
@@ -31,11 +31,15 @@ import org.apache.ignite.resources.LoggerResource;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests execution of anonymous closures on remote nodes.
*/
@GridCommonTest(group = "Closure Processor")
+@RunWith(JUnit4.class)
public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest {
/** Number of grids started for tests. Should not be less than 2. */
public static final int NODES_CNT = 2;
@@ -66,6 +70,7 @@ public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest {
/**
* @throws Exception Thrown in case of failure.
*/
+ @Test
public void testAnonymousBroadcast() throws Exception {
Ignite g = grid(0);
@@ -90,6 +95,7 @@ public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest {
/**
* @throws Exception Thrown in case of failure.
*/
+ @Test
public void testAnonymousUnicast() throws Exception {
Ignite g = grid(0);
@@ -117,6 +123,7 @@ public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest {
*
* @throws Exception Thrown in case of failure.
*/
+ @Test
public void testAnonymousUnicastRequest() throws Exception {
Ignite g = grid(0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
index fef74e8..45289b6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
@@ -48,11 +48,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for {@link GridClosureProcessor}.
*/
@GridCommonTest(group = "Closure Processor")
+@RunWith(JUnit4.class)
public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/** Number of grids started for tests. Should not be less than 2. */
private static final int NODES_CNT = 2;
@@ -314,6 +318,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testRunAsyncSingle() throws Exception {
IgniteRunnable job = new ClosureTestRunnable();
@@ -340,6 +345,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testRunAsyncMultiple() throws Exception {
Collection<ClosureTestRunnable> jobs = F.asList(new ClosureTestRunnable(), new ClosureTestRunnable());
@@ -354,6 +360,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCallAsyncSingle() throws Exception {
IgniteCallable<Integer> job = new ClosureTestCallable();
@@ -382,6 +389,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCallAsyncErrorNoFailover() throws Exception {
IgniteCompute comp = compute(grid(0).cluster().forPredicate(F.notEqualTo(grid(0).localNode())));
@@ -400,6 +408,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testWithName() throws Exception {
grid(0).compute().withName("TestTaskName").call(new ClosureTestCallable());
}
@@ -407,6 +416,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testWithTimeout() throws Exception {
Collection<TestCallableTimeout> jobs = F.asList(new TestCallableTimeout());
@@ -438,6 +448,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCallAsyncMultiple() throws Exception {
Collection<ClosureTestCallable> jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable());
@@ -457,6 +468,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testReduceAsync() throws Exception {
Collection<ClosureTestCallable> jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable());
@@ -477,6 +489,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testReducerError() throws Exception {
final Ignite g = grid(0);
@@ -508,4 +521,4 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
}
}, IgniteException.class, null);
}
-}
\ No newline at end of file
+}