http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java index 65dc2e7..1ce99ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -44,6 +47,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * Tests for local transactions. */ +@RunWith(JUnit4.class) public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstractTest { /** * @return Thread count. @@ -108,6 +112,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, READ_COMMITTED); @@ -117,6 +122,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, REPEATABLE_READ); @@ -126,6 +132,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, SERIALIZABLE); @@ -135,6 +142,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedCommitMultithreaded() throws Exception { checkCommitMultithreaded(OPTIMISTIC, READ_COMMITTED); @@ -144,6 +152,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadCommitMultithreaded() throws Exception { checkCommitMultithreaded(OPTIMISTIC, REPEATABLE_READ); @@ -153,6 +162,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableCommitMultithreaded() throws Exception { checkCommitMultithreaded(OPTIMISTIC, SERIALIZABLE); @@ -162,6 +172,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, READ_COMMITTED); @@ -171,6 +182,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, REPEATABLE_READ); @@ -180,6 +192,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, SERIALIZABLE); @@ -189,6 +202,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(OPTIMISTIC, READ_COMMITTED); @@ -198,6 +212,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(OPTIMISTIC, REPEATABLE_READ); @@ -207,6 +222,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(OPTIMISTIC, SERIALIZABLE); @@ -216,6 +232,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableConsistency() throws Exception { final IgniteCache<Integer, Long> cache = grid(0).cache(DEFAULT_CACHE_NAME);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java index 39066a2..5cb1328 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -47,6 +50,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Tests reentry in pessimistic repeatable read tx. */ +@RunWith(JUnit4.class) public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -98,6 +102,7 @@ public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstract } /** @throws Exception If failed. */ + @Test public void testLockReentry() throws Exception { startGridsMultiThreaded(gridCount(), true); @@ -180,4 +185,4 @@ public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstract return dhtLocks.get(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java index f2cdece..72ccb7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.IgniteCheckedException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -28,10 +31,12 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * Tests for local transactions. */ +@RunWith(JUnit4.class) public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstractTest { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedCommit() throws Exception { checkCommit(PESSIMISTIC, READ_COMMITTED); @@ -41,6 +46,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadCommit() throws Exception { checkCommit(PESSIMISTIC, REPEATABLE_READ); @@ -50,6 +56,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableCommit() throws Exception { checkCommit(PESSIMISTIC, SERIALIZABLE); @@ -59,6 +66,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedCommit() throws Exception { checkCommit(OPTIMISTIC, READ_COMMITTED); @@ -68,6 +76,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadCommit() throws Exception { checkCommit(OPTIMISTIC, REPEATABLE_READ); @@ -77,6 +86,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableCommit() throws Exception { checkCommit(OPTIMISTIC, SERIALIZABLE); @@ -86,6 +96,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedRollback() throws Exception { checkRollback(PESSIMISTIC, READ_COMMITTED); @@ -95,6 +106,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadRollback() throws Exception { checkRollback(PESSIMISTIC, REPEATABLE_READ); @@ -104,6 +116,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableRollback() throws Exception { checkRollback(PESSIMISTIC, SERIALIZABLE); @@ -113,6 +126,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedRollback() throws Exception { checkRollback(OPTIMISTIC, READ_COMMITTED); @@ -122,6 +136,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadRollback() throws Exception { checkRollback(OPTIMISTIC, REPEATABLE_READ); @@ -131,9 +146,10 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableRollback() throws Exception { checkRollback(OPTIMISTIC, SERIALIZABLE); finalChecks(); } -} \ 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/IgniteTxStoreExceptionAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java index 30016da..54218d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionRollbackException; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -50,6 +53,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests that transaction is invalidated in case of {@link IgniteTxHeuristicCheckedException}. */ +@RunWith(JUnit4.class) public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAbstractSelfTest { /** Index SPI throwing exception. */ private static TestStore store; @@ -121,6 +125,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutNear() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -130,6 +135,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutPrimary() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), PRIMARY)); @@ -139,6 +145,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutBackup() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), BACKUP)); @@ -148,6 +155,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { checkPutAll(true, keyForNode(grid(0).localNode(), PRIMARY), keyForNode(grid(0).localNode(), PRIMARY), @@ -171,6 +179,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testRemoveNear() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -180,6 +189,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testRemovePrimary() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), PRIMARY)); @@ -189,6 +199,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testRemoveBackup() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), BACKUP)); @@ -198,6 +209,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testTransformNear() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -207,6 +219,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testTransformPrimary() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), PRIMARY)); @@ -216,6 +229,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testTransformBackup() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), BACKUP)); @@ -225,6 +239,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutNearTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -238,6 +253,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutPrimaryTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -251,6 +267,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutBackupTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -264,6 +281,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutMultipleKeysTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -675,4 +693,4 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb throw new CacheWriterException("Store exception"); } } -} \ 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/InterceptorCacheConfigVariationsFullApiTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java index 8834c05..a323067 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.cache.CacheInterceptor; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgniteBiTuple; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Full API cache test. */ @SuppressWarnings({"unchecked"}) +@RunWith(JUnit4.class) public class InterceptorCacheConfigVariationsFullApiTest extends IgniteCacheConfigVariationsFullApiTest { /** */ private static volatile boolean validate = true; @@ -42,16 +46,19 @@ public class InterceptorCacheConfigVariationsFullApiTest extends IgniteCacheConf } /** {@inheritDoc} */ + @Test @Override public void testTtlNoTx() throws Exception { // No-op. } /** {@inheritDoc} */ + @Test @Override public void testTtlNoTxOldEntry() throws Exception { // No-op. } /** {@inheritDoc} */ + @Test @Override public void testTtlTx() throws Exception { // No-op. } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java index 2ebc232..688b3bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.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 MarshallerCacheJobRunNodeRestartTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -55,6 +59,7 @@ public class MarshallerCacheJobRunNodeRestartTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testJobRun() throws Exception { for (int i = 0; i < 5; i++) { U.resolveWorkDirectory(U.defaultWorkDirectory(), "marshaller", true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java index 6dec847..c73f6d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.MemoryConfiguration; import org.apache.ignite.configuration.MemoryPolicyConfiguration; 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 MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** */ private static final String VALID_DEFAULT_MEM_PLC_NAME = "valid_dlft_mem_plc"; @@ -240,6 +244,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * 'sysMemPlc' name is reserved for MemoryPolicyConfiguration for system caches. */ + @Test public void testReservedMemoryPolicyMisuse() throws Exception { violationType = ValidationViolationType.SYSTEM_MEMORY_POLICY_NAME_MISUSE; @@ -249,6 +254,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * If user defines default is must be presented among configured memory policies. */ + @Test public void testMissingUserDefinedDefault() throws Exception { violationType = ValidationViolationType.MISSING_USER_DEFINED_DEFAULT; @@ -258,6 +264,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * Names of all MemoryPolicies must be distinct. */ + @Test public void testNamesConflict() throws Exception { violationType = ValidationViolationType.NAMES_CONFLICT; @@ -267,6 +274,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * User-defined policy must have a non-null non-empty name. */ + @Test public void testNullNameOnUserDefinedPolicy() throws Exception { violationType = ValidationViolationType.NULL_NAME_ON_USER_DEFINED_POLICY; @@ -276,6 +284,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * MemoryPolicy must be configured with size of at least 1MB. */ + @Test public void testMemoryTooSmall() throws Exception { violationType = ValidationViolationType.TOO_SMALL_MEMORY_SIZE; @@ -285,6 +294,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * MemoryPolicy must be configured with size of at least 1MB. */ + @Test public void testMaxSizeSmallerThanInitialSize() throws Exception { violationType = ValidationViolationType.MAX_SIZE_IS_SMALLER_THAN_INITIAL_SIZE; @@ -294,6 +304,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * User-defined size of default MemoryPolicy must be at least 1MB. */ + @Test public void testUserDefinedDefaultMemoryTooSmall() throws Exception { violationType = ValidationViolationType.TOO_SMALL_USER_DEFINED_DFLT_MEM_PLC_SIZE; @@ -304,6 +315,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { * Defining size of default MemoryPolicy twice with and through <b>defaultMemoryPolicySize</b> property * and using <b>MemoryPolicyConfiguration</b> description is prohibited. */ + @Test public void testDefaultMemoryPolicySizeDefinedTwice() throws Exception { violationType = ValidationViolationType.DEFAULT_SIZE_IS_DEFINED_TWICE; @@ -313,6 +325,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * */ + @Test public void testRateTimeIntervalPropertyIsNegative() throws Exception { violationType = ValidationViolationType.LTE_ZERO_RATE_TIME_INTERVAL; @@ -322,6 +335,7 @@ public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** * */ + @Test public void testSubIntervalsPropertyIsNegative() throws Exception { violationType = ValidationViolationType.LTE_ZERO_SUB_INTERVALS; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java index f88f5b9..a94a3e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java @@ -31,10 +31,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 NonAffinityCoordinatorDynamicStartStopTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -98,6 +102,7 @@ public class NonAffinityCoordinatorDynamicStartStopTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testStartStop() 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/OffheapCacheMetricsForClusterGroupSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java index 6adb9d6..b29cb18 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.events.Event; import org.apache.ignite.events.EventType; import org.apache.ignite.lang.IgnitePredicate; 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.events.EventType.EVT_NODE_METRICS_UPDATED; /** * Test for cluster wide offheap cache metrics. */ +@RunWith(JUnit4.class) public class OffheapCacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; @@ -64,6 +68,7 @@ public class OffheapCacheMetricsForClusterGroupSelfTest extends GridCommonAbstra startGrid("client-" + i); } + @Test public void testGetOffHeapPrimaryEntriesCount() throws Exception { String cacheName = "testGetOffHeapPrimaryEntriesCount"; IgniteCache<Integer, Integer> cache = grid("client-0").createCache(cacheConfiguration(cacheName)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java index 1c847f9..a001bd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Advanced coordinator failure scenarios during PME. */ +@RunWith(JUnit4.class) public class PartitionsExchangeCoordinatorFailoverTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -75,6 +79,7 @@ public class PartitionsExchangeCoordinatorFailoverTest extends GridCommonAbstrac /** * Tests that new coordinator is able to finish old exchanges in case of in-complete coordinator initialization. */ + @Test public void testNewCoordinatorCompletedExchange() throws Exception { IgniteEx crd = (IgniteEx) startGrid("crd"); @@ -158,6 +163,7 @@ public class PartitionsExchangeCoordinatorFailoverTest extends GridCommonAbstrac * * @throws Exception If failed. */ + @Test public void testDelayedFullMessageReplacedIfCoordinatorChanged() throws Exception { IgniteEx crd = startGrid("crd"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java index c0896c8..1a39090 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.internal.util.typedef.P1; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -44,6 +47,7 @@ import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVE /** * Test discovery history overflow. */ +@RunWith(JUnit4.class) public class PartitionsExchangeOnDiscoveryHistoryOverflowTest extends IgniteCacheAbstractTest { /** */ private static final int CACHES_COUNT = 30; @@ -121,6 +125,7 @@ public class PartitionsExchangeOnDiscoveryHistoryOverflowTest extends IgniteCach /** * @throws Exception In case of error. */ + @Test public void testDynamicCacheCreation() throws Exception { for (int iter = 0; iter < 5; iter++) { log.info("Iteration: " + iter); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java index 490b640..926978c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; 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; @@ -57,6 +60,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -83,6 +87,7 @@ public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTe /** * */ + @Test public void testDefaultTxTimeoutOnPartitionMapExchange() throws Exception { IgniteEx ig1 = startGrid(1); IgniteEx ig2 = startGrid(2); @@ -99,6 +104,7 @@ public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTe /** * */ + @Test public void testJmxSetTxTimeoutOnPartitionMapExchange() throws Exception { startGrid(1); startGrid(2); @@ -121,6 +127,7 @@ public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTe /** * */ + @Test public void testClusterSetTxTimeoutOnPartitionMapExchange() throws Exception { Ignite ig1 = startGrid(1); Ignite ig2 = startGrid(2); @@ -140,6 +147,7 @@ public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTe * * @throws Exception If fails. */ + @Test public void testSetTxTimeoutDuringPartitionMapExchange() throws Exception { IgniteEx ig = (IgniteEx) startGrids(2); @@ -151,6 +159,7 @@ public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTe * * @throws Exception If fails. */ + @Test public void testSetTxTimeoutOnClientDuringPartitionMapExchange() throws Exception { IgniteEx ig = (IgniteEx) startGrids(2); IgniteEx client = startGrid(getConfiguration("client").setClientMode(true)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java index 467d6ff..9bc1347 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.lang.IgniteInClosureX; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.apache.ignite.testframework.MvccFeatureChecker; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; * Test dynamic WAL mode change. */ +@RunWith(JUnit4.class) public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonAbstractSelfTest { /** Whether coordinator node should be filtered out. */ private final boolean filterOnCrd; @@ -73,6 +77,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testNullCacheName() throws Exception { forAllNodes(new IgniteInClosureX<Ignite>() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -92,6 +97,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testNoCache() throws Exception { forAllNodes(new IgniteInClosureX<Ignite>() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -112,6 +118,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testSharedCacheGroup() throws Exception { forAllNodes(new IgniteInClosureX<Ignite>() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -147,6 +154,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testPersistenceDisabled() throws Exception { forAllNodes(new IgniteInClosureX<Ignite>() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -183,6 +191,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testLocalCache() throws Exception { if (jdbc) // Doesn't make sense for JDBC. @@ -220,6 +229,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testEnableDisablePartitionedAtomic() throws Exception { checkEnableDisable(PARTITIONED, ATOMIC); } @@ -229,6 +239,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testEnableDisablePartitionedTransactional() throws Exception { checkEnableDisable(PARTITIONED, TRANSACTIONAL); } @@ -238,6 +249,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testEnableDisableReplicatedAtomic() throws Exception { checkEnableDisable(REPLICATED, ATOMIC); } @@ -247,6 +259,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testEnableDisableReplicatedTransactional() throws Exception { checkEnableDisable(REPLICATED, TRANSACTIONAL); } @@ -281,6 +294,7 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA * * @throws Exception If failed. */ + @Test public void testDisablingProhibition() throws Exception { forAllNodes(new IgniteInClosureX<Ignite>() { @Override public void applyx(Ignite ig) throws IgniteCheckedException { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java index 9540d22..50f82b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.IgniteClientReconnectAbstractTest; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.apache.ignite.testframework.MvccFeatureChecker; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; * Concurrent and advanced tests for WAL state change. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSelfTest { /** * Constructor. @@ -66,6 +70,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testCacheCleanup() throws Exception { Ignite srv = startGrid(config(SRV_1, false, false)); @@ -134,6 +139,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10421"); @@ -146,6 +152,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testJoinCoordinator() throws Exception { checkJoin(true); } @@ -214,6 +221,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testServerRestartNonCoordinator() throws Exception { checkNodeRestart(false); } @@ -223,6 +231,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testServerRestartCoordinator() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7472"); @@ -305,6 +314,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { final Ignite srv = startGrid(config(SRV_1, false, false)); Ignite cli = startGrid(config(CLI, true, false)); @@ -363,6 +373,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testCacheDestroy() throws Exception { final Ignite srv = startGrid(config(SRV_1, false, false)); Ignite cli = startGrid(config(CLI, true, false)); @@ -423,6 +434,7 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * * @throws Exception If failed. */ + @Test public void testConcurrentOperations() throws Exception { final Ignite srv1 = startGrid(config(SRV_1, false, false)); final Ignite srv2 = startGrid(config(SRV_2, false, false)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java index 8f5a096..d950962 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.junits.IgniteCacheConfigVariationsAbstrac 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.testframework.junits.IgniteConfigVariationsAbstractTest.DataMode.PLANE_OBJECT; @@ -45,6 +48,7 @@ import static org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstr * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsAbstractTest { /** */ protected static volatile boolean interceptorBinaryObjExp = true; @@ -122,6 +126,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testRemovePutGet() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -177,6 +182,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testRemovePutGetAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -233,6 +239,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testPutAllGetAll() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -300,6 +307,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testPutAllGetAllAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -373,6 +381,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvoke() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -438,6 +447,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA /** * @throws Exception If failed. */ + @Test public void testInvokeTx() throws Exception { if (!txShouldBeUsed()) return; @@ -557,6 +567,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -622,6 +633,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA /** * @throws Exception If failed. */ + @Test public void testInvokeAsyncTx() throws Exception { if (!txShouldBeUsed()) return; @@ -743,6 +755,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAll() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -794,6 +807,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAllTx() throws Exception { if (!txShouldBeUsed()) return; @@ -926,6 +940,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAllAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -984,6 +999,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAllAsyncTx() throws Exception { if (!txShouldBeUsed()) return; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java index 59a1e33..2aadb69 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.DiscoveryHook; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; import static org.junit.Assert.assertArrayEquals; @@ -57,6 +60,7 @@ import static org.junit.Assert.assertArrayEquals; /** * */ +@RunWith(JUnit4.class) public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { /** */ private static final String SEQ_NUM_FLD = "f0"; @@ -181,6 +185,7 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFlowNoConflicts() throws Exception { startGridsMultiThreaded(GRID_CNT); @@ -204,6 +209,7 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFlowNoConflictsWithClients() throws Exception { startGridsMultiThreaded(GRID_CNT); @@ -298,6 +304,7 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentMetadataUpdates() throws Exception { startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java index 3528161..1240dd9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryTxCacheLocalEntriesSelfTest extends GridCacheAbstractSelfTest { /** */ private static final String FIELD = "user-name"; @@ -58,6 +62,7 @@ public class BinaryTxCacheLocalEntriesSelfTest extends GridCacheAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testLocalEntries() throws Exception { IgniteCache<Integer, BinaryObject> cache = grid(0).cache(DEFAULT_CACHE_NAME).withKeepBinary(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java index 667b305..916eace 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -40,6 +43,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -65,6 +69,7 @@ public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testKeepBinaryWithInterceptor() throws Exception { startGrid(0); @@ -86,6 +91,7 @@ public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testKeepBinaryWithInterceptorOnMvccCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9323"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java index c65f41c..35a4d76 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.binary.BinaryInvalidTypeException; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.configuration.DeploymentMode; import org.apache.ignite.internal.processors.cache.GridCacheAtomicEntryProcessorDeploymentSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cache EntryProcessor + Deployment. */ +@RunWith(JUnit4.class) public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest extends GridCacheAtomicEntryProcessorDeploymentSelfTest { /** {@inheritDoc} */ @@ -41,6 +45,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest /** * @throws Exception In case of error. */ + @Test public void testGetDeployment() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -50,6 +55,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest /** * @throws Exception In case of error. */ + @Test public void testGetDeployment2() throws Exception { depMode = DeploymentMode.SHARED; @@ -59,6 +65,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest /** * @throws Exception In case of error. */ + @Test public void testGetDeploymentWithKeepBinary() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -68,6 +75,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest /** * @throws Exception In case of error. */ + @Test public void testGetDeployment2WithKeepBinary() throws Exception { depMode = DeploymentMode.SHARED; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java index 03f0628..0786562 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java @@ -53,10 +53,14 @@ import org.apache.ignite.testframework.GridTestUtils.DiscoveryHook; import org.apache.ignite.testframework.GridTestUtils.DiscoverySpiListenerWrapper; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -123,6 +127,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm * Verifies that if thread tries to read metadata with ongoing update it gets blocked * until acknowledge message arrives. */ + @Test public void testReadRequestBlockedOnUpdatingMetadata() throws Exception { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -222,6 +227,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm /** * Verifies that all sequential updates that don't introduce any conflicts are accepted and observed by all nodes. */ + @Test public void testSequentialUpdatesNoConflicts() throws Exception { IgniteEx ignite0 = startGrid(0); @@ -255,6 +261,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm /** * Verifies that client is able to detect obsolete metadata situation and request up-to-date from the cluster. */ + @Test public void testClientRequestsUpToDateMetadata() throws Exception { final IgniteEx ignite0 = startGrid(0); @@ -290,6 +297,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm /** * Verifies that client resends request for up-to-date metadata in case of failure on server received first request. */ + @Test public void testClientRequestsUpToDateMetadataOneNodeDies() throws Exception { final Ignite srv0 = startGrid(0); replaceWithStoppingMappingRequestListener(((GridKernalContext)U.field(srv0, "ctx")).io(), 0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java index 40d8d04..0ae5de8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -43,6 +46,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCacheBinaryObjectUserClassloaderSelfTest extends GridCommonAbstractTest { /** */ private static volatile boolean customBinaryConf = false; @@ -140,6 +144,7 @@ public class GridCacheBinaryObjectUserClassloaderSelfTest extends GridCommonAbst /** * @throws Exception If test failed. */ + @Test public void testConfigurationRegistration() throws Exception { useWrappingLoader = false; @@ -149,6 +154,7 @@ public class GridCacheBinaryObjectUserClassloaderSelfTest extends GridCommonAbst /** * @throws Exception If test failed. */ + @Test public void testConfigurationRegistrationWithWrappingLoader() throws Exception { useWrappingLoader = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java index 472a7a0..05fac42 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.binary.BinaryMarshaller; 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.CacheWriteSynchronizationMode.PRIMARY_SYNC; /** * Test for binary objects stored in cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryObjectsAbstractDataStreamerSelfTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 64; @@ -111,6 +115,7 @@ public abstract class GridCacheBinaryObjectsAbstractDataStreamerSelfTest extends * @throws Exception If failed. */ @SuppressWarnings("BusyWait") + @Test public void testGetPut() throws Exception { final AtomicBoolean flag = new AtomicBoolean(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java index e2a1a8b..f4d63f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java @@ -45,12 +45,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; /** * Test for binary objects stored in cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryObjectsAbstractMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -124,7 +128,9 @@ public abstract class GridCacheBinaryObjectsAbstractMultiThreadedSelfTest extend /** * @throws Exception If failed. */ - @SuppressWarnings("BusyWait") public void testGetPut() throws Exception { + @SuppressWarnings("BusyWait") + @Test + public void testGetPut() throws Exception { final AtomicBoolean flag = new AtomicBoolean(); final LongAdder cnt = new LongAdder(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java index 98e906f..c618f19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java @@ -77,6 +77,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 org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -87,6 +90,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Test for binary objects stored in cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -222,6 +226,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testCircularReference() throws Exception { IgniteCache c = keepBinaryCache(); @@ -266,6 +271,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -290,6 +296,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -322,6 +329,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -348,6 +356,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -387,6 +396,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testCollection() throws Exception { IgniteCache<Integer, Collection<TestObject>> c = jcache(0); @@ -433,6 +443,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testMap() throws Exception { IgniteCache<Integer, Map<Integer, TestObject>> c = jcache(0); @@ -478,6 +489,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testSingletonList() throws Exception { IgniteCache<Integer, Collection<TestObject>> c = jcache(0); @@ -505,6 +517,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAsync() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -531,6 +544,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testBasicArrays() throws Exception { IgniteCache<Integer, Object> cache = jcache(0); @@ -564,6 +578,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testCustomArrays() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-3244"); @@ -600,6 +615,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetTx1() throws Exception { checkGetTx(PESSIMISTIC, REPEATABLE_READ); } @@ -607,6 +623,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetTx2() throws Exception { checkGetTx(PESSIMISTIC, READ_COMMITTED); } @@ -653,6 +670,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetTxAsync1() throws Exception { checkGetAsyncTx(PESSIMISTIC, REPEATABLE_READ); } @@ -660,6 +678,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetTxAsync2() throws Exception { checkGetAsyncTx(PESSIMISTIC, READ_COMMITTED); } @@ -707,6 +726,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAsyncTx() throws Exception { if (atomicityMode() != TRANSACTIONAL) return; @@ -742,6 +762,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -782,6 +803,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAllAsync() throws Exception { IgniteCache<Integer, TestObject> c = jcache(0); @@ -822,6 +844,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAllTx1() throws Exception { checkGetAllTx(PESSIMISTIC, REPEATABLE_READ); } @@ -829,6 +852,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAllTx2() throws Exception { checkGetAllTx(PESSIMISTIC, READ_COMMITTED); } @@ -894,6 +918,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAllAsyncTx1() throws Exception { checkGetAllAsyncTx(PESSIMISTIC, REPEATABLE_READ); } @@ -901,6 +926,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testGetAllAsyncTx2() throws Exception { checkGetAllAsyncTx(PESSIMISTIC, READ_COMMITTED); } @@ -966,6 +992,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA * */ @SuppressWarnings("unchecked") + @Test public void testCrossFormatObjectsIdentity() { IgniteCache c = binKeysCache(); @@ -987,6 +1014,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA * */ @SuppressWarnings("unchecked") + @Test public void testPutWithArrayHashing() { IgniteCache c = binKeysCache(); @@ -1021,6 +1049,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA * */ @SuppressWarnings("unchecked") + @Test public void testPutWithFieldsHashing() { IgniteCache c = binKeysCache(); @@ -1054,6 +1083,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA * */ @SuppressWarnings("unchecked") + @Test public void testPutWithCustomHashing() { IgniteCache c = binKeysCache(); @@ -1084,6 +1114,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception if failed. */ + @Test public void testKeepBinaryTxOverwrite() throws Exception { if (atomicityMode() != TRANSACTIONAL) return; @@ -1108,6 +1139,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).localLoadCache(null); @@ -1124,6 +1156,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsync() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).loadCacheAsync(null).get(); @@ -1140,6 +1173,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testLoadCacheFilteredAsync() throws Exception { for (int i = 0; i < gridCount(); i++) { IgniteCache<Integer, TestObject> c = jcache(i); @@ -1164,6 +1198,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testTransform() throws Exception { IgniteCache<Integer, BinaryObject> c = keepBinaryCache(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java index 1b7cb29..5ffc2cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for cache store with binary. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -110,6 +114,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { jcache().put(new Key(1), new Value(1)); @@ -119,6 +124,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { Map<Object, Object> map = new HashMap<>(); @@ -133,6 +139,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testLoad() throws Exception { populateMap(STORE.map(), 1); @@ -146,6 +153,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testLoadAll() throws Exception { populateMap(STORE.map(), 1, 2, 3); @@ -170,6 +178,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { for (int i = 1; i <= 3; i++) jcache().put(new Key(i), new Value(i)); @@ -182,6 +191,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { for (int i = 1; i <= 3; i++) jcache().put(new Key(i), new Value(i)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java index 3da8605..eed10cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java @@ -42,12 +42,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.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo /** * @throws Exception If failed. */ + @Test public void testClientMetadataInitialization() throws Exception { startGrids(2); @@ -181,6 +186,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo /** * @throws Exception If failed. */ + @Test public void testFailoverOnStart() throws Exception { startGrids(4); @@ -267,6 +273,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo /** * @throws Exception If failed. */ + @Test public void testClientStartsFirst() throws Exception { client = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java index 0316edc..3215713 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * */ +@RunWith(JUnit4.class) public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -94,6 +98,7 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testBinaryMetadataOnClient() throws Exception { Ignite ignite0 = ignite(gridCount() - 1);
