http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java index 5e7b4e2..fb8a57d 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests affinity function with different number of backups. */ +@RunWith(JUnit4.class) public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest { /** */ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -63,6 +67,7 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRendezvousBackups() throws Exception { for (int i = 0; i < nodesCnt; i++) checkBackups(i); @@ -97,4 +102,4 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest { stopAllGrids(); } } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java index 55e54fb..d73e060 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java @@ -21,14 +21,19 @@ import java.io.IOException; import java.util.List; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testHasCause() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -40,6 +45,7 @@ public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testGetCause() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -55,6 +61,7 @@ public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testXHasCause() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -71,6 +78,7 @@ public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testXGetSuppressedList() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -91,6 +99,7 @@ public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testXCause() throws Exception { IgniteCheckedException me = prepareMultiException(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java index cf54949..001fa18 100644 --- a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.affinity.GridAffinityProcessor; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; +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; @@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for {@link GridAffinityProcessor.CacheAffinityProxy}. */ +@RunWith(JUnit4.class) public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { /** Initial grid count. */ private int GRID_CNT = 3; @@ -87,6 +91,7 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { /** * @throws Exception if failed. */ + @Test public void testAffinity() throws Exception { checkAffinity(); @@ -301,4 +306,4 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { private Collection<ClusterNode> nodes() { return grid(0).cluster().nodes(); } -} \ 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/cache/IgniteCacheEntryProcessorSequentialCallTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java b/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java index f940856..94c0bc6 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java @@ -31,9 +31,13 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstractTest { /** */ private static final String CACHE = "cache"; @@ -54,6 +58,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr stopAllGrids(); } + /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); @@ -94,6 +99,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testOptimisticSerializableTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE); @@ -103,6 +109,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testOptimisticRepeatableReadTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.REPEATABLE_READ); @@ -112,6 +119,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testOptimisticReadCommittedTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED); @@ -121,6 +129,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testPessimisticSerializableTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); @@ -130,6 +139,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testPessimisticRepeatableReadTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ); @@ -139,6 +149,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testPessimisticReadCommittedTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.READ_COMMITTED); @@ -148,6 +159,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testMvccTxInvokeSequentialCall() throws Exception { cacheName = MVCC_CACHE; @@ -243,6 +255,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr * Test for sequential entry processor invocation. During transaction value is changed externally, which leads to * optimistic conflict exception. */ + @Test @SuppressWarnings("ThrowableNotThrown") public void testTxInvokeSequentialOptimisticConflict() throws Exception { TestKey key = new TestKey(1L); @@ -348,4 +361,4 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr this.val = val; } } -} \ 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/cache/IgniteWarmupClosureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java index 1fccb90..38dae82 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.startup.BasicWarmupClosure; 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 IgniteWarmupClosureSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -72,7 +76,8 @@ public class IgniteWarmupClosureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWarmupClosure() throws Exception { startGrid(1); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java index 008da71..e842a10 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.resources.IgniteInstanceResource; 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 LargeEntryUpdateTest extends GridCommonAbstractTest { /** */ private static final int THREAD_COUNT = 10; @@ -95,6 +99,7 @@ public class LargeEntryUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntryUpdate() throws Exception { try (Ignite ignite = startGrid()) { for (int i = 0; i < CACHE_COUNT; ++i) { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java index 6f1e78b..75f7264 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java @@ -37,6 +37,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.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.LOST; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; @@ -45,6 +48,7 @@ import static org.apache.ignite.internal.processors.cache.persistence.file.FileP /** * */ +@RunWith(JUnit4.class) public class ResetLostPartitionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -130,6 +134,7 @@ public class ResetLostPartitionTest extends GridCommonAbstractTest { * * @throws Exception if fail. */ + @Test public void testReactivateGridBeforeResetLostPartitions() throws Exception { doRebalanceAfterPartitionsWereLost(true); } @@ -139,6 +144,7 @@ public class ResetLostPartitionTest extends GridCommonAbstractTest { * * @throws Exception if fail. */ + @Test public void testResetLostPartitions() throws Exception { doRebalanceAfterPartitionsWereLost(false); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java index 8f8d78a..d11609e 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.affinity.GridAffinityFunctionContextImpl; import org.apache.ignite.testframework.GridTestNode; 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 abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstractTest { /** MAC prefix. */ private static final String MAC_PREF = "MAC"; @@ -50,6 +54,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testNodeRemovedNoBackups() throws Exception { checkNodeRemoved(0); } @@ -57,6 +62,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testNodeRemovedOneBackup() throws Exception { checkNodeRemoved(1); } @@ -64,6 +70,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testNodeRemovedTwoBackups() throws Exception { checkNodeRemoved(2); } @@ -71,6 +78,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testNodeRemovedThreeBackups() throws Exception { checkNodeRemoved(3); } @@ -78,6 +86,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentNoBackups() throws Exception { checkRandomReassignment(0); } @@ -85,6 +94,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentOneBackup() throws Exception { checkRandomReassignment(1); } @@ -92,6 +102,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentTwoBackups() throws Exception { checkRandomReassignment(2); } @@ -99,6 +110,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentThreeBackups() throws Exception { checkRandomReassignment(3); } @@ -107,6 +119,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac * @param backups Number of backups. * @throws Exception If failed. */ + @Test public void testNullKeyForPartitionCalculation() throws Exception { AffinityFunction aff = affinityFunction(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java index 6d1c020..fddebd1 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * */ +@RunWith(JUnit4.class) public class AffinityClientNodeSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -109,6 +113,7 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeNotInAffinity() throws Exception { checkCache(CACHE1, 2); @@ -238,4 +243,4 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest { return true; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java index 0168c7c..60ddfd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME; @@ -46,6 +49,7 @@ import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_IGNITE_INSTAN * * @see EvenDistributionAffinityFunction */ +@RunWith(JUnit4.class) public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** Pattern to test. */ private static final String LOG_MESSAGE_PREFIX = "Local node affinity assignment distribution is not ideal "; @@ -102,6 +106,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test2PartitionsIdealDistributionIsNotLogged() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "0"); @@ -117,6 +122,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test120PartitionsIdeadDistributionIsNotLogged() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "0.0"); @@ -132,6 +138,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test5PartitionsNotIdealDistributionIsLogged() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "50.0"); @@ -147,6 +154,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test5PartitionsNotIdealDistributionSuppressedLoggingOnClientNode() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "0.0"); @@ -162,6 +170,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test7PartitionsNotIdealDistributionSuppressedLogging() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "50.0"); @@ -177,6 +186,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test5PartitionsNotIdealDistributionSuppressedLogging() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "65"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java index 3f7a710..909b741 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +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; @@ -42,6 +45,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Base tests of {@link AffinityFunction} implementations with user provided backup filter. */ +@RunWith(JUnit4.class) public abstract class AffinityFunctionBackupFilterAbstractSelfTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -156,6 +160,7 @@ public abstract class AffinityFunctionBackupFilterAbstractSelfTest extends GridC /** * @throws Exception If failed. */ + @Test public void testPartitionDistribution() throws Exception { backups = 1; @@ -205,6 +210,7 @@ public abstract class AffinityFunctionBackupFilterAbstractSelfTest extends GridC /** * @throws Exception If failed. */ + @Test public void testPartitionDistributionWithAffinityBackupFilter() throws Exception { backups = 3; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java index 6df7850..a13cf5a 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -42,6 +45,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.NONE; /** * Partitioned affinity test. */ +@RunWith(JUnit4.class) public abstract class AffinityFunctionExcludeNeighborsAbstractSelfTest extends GridCommonAbstractTest { /** Number of backups. */ private int backups = 2; @@ -107,6 +111,7 @@ public abstract class AffinityFunctionExcludeNeighborsAbstractSelfTest extends G /** * @throws Exception If failed. */ + @Test public void testAffinityMultiNode() throws Exception { int grids = 9; @@ -158,6 +163,7 @@ public abstract class AffinityFunctionExcludeNeighborsAbstractSelfTest extends G /** * @throws Exception If failed. */ + @Test public void testAffinitySingleNode() throws Exception { Ignite g = startGrid(); @@ -174,4 +180,4 @@ public abstract class AffinityFunctionExcludeNeighborsAbstractSelfTest extends G stopAllGrids(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java index f89d9ee..ff7f105 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java @@ -36,10 +36,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 AffinityHistoryCleanupTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -81,6 +85,7 @@ public class AffinityHistoryCleanupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityHistoryCleanup() throws Exception { String histProp = System.getProperty(IgniteSystemProperties.IGNITE_AFFINITY_HISTORY_SIZE); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java index e08d212..e83b96b 100755 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for local affinity function. */ +@RunWith(JUnit4.class) public class LocalAffinityFunctionTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -61,6 +65,7 @@ public class LocalAffinityFunctionTest extends GridCommonAbstractTest { startGrids(NODE_CNT); } + @Test public void testWronglySetAffinityFunctionForLocalCache() { Ignite node = ignite(NODE_CNT - 1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java index 452a1fb..7dec6b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java @@ -65,11 +65,15 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Simple benchmarks, compatibility test and distribution check utils for affinity functions. * Needs to check changes at the {@link RendezvousAffinityFunction}. */ +@RunWith(JUnit4.class) public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstractTest { /** MAC prefix. */ private static final String MAC_PREF = "MAC"; @@ -346,6 +350,7 @@ public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstrac /** * @throws IOException On error. */ + @Test public void testDistribution() throws IOException { AffinityFunction aff0 = new RendezvousAffinityFunction(true, 1024); @@ -397,6 +402,7 @@ public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstrac /** * */ + @Test public void testAffinityBenchmarkAdd() { mode = TopologyModificationMode.ADD; @@ -410,6 +416,7 @@ public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstrac /** * */ + @Test public void testAffinityBenchmarkChangeLast() { mode = TopologyModificationMode.CHANGE_LAST_NODE; @@ -503,6 +510,7 @@ public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstrac /** * */ + @Test public void testPartitionsMigrate() { int[] nodesCnts = {2, 3, 10, 64, 100, 200, 300, 400, 500, 600}; @@ -548,6 +556,7 @@ public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstrac /** * */ + @Test public void testAffinityCompatibility() { AffinityFunction aff0 = new RendezvousAffinityFunction(true, 1024); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java index faf30b7..0fa1994 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java @@ -24,6 +24,10 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Before; +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.OPTIMISTIC; @@ -36,8 +40,10 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; * This class tests that redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * and {@link CacheStoreSessionListener#onSessionEnd(CacheStoreSession, boolean)} are not executed. */ +@RunWith(JUnit4.class) public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -52,6 +58,7 @@ public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends C /** * Tests {@link IgniteCache#get(Object)} with disabled read-through and write-through modes. */ + @Test public void testTransactionalLookup() { testTransactionalLookup(OPTIMISTIC, READ_COMMITTED); testTransactionalLookup(OPTIMISTIC, REPEATABLE_READ); @@ -82,6 +89,7 @@ public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends C /** * Tests {@link IgniteCache#put(Object, Object)} with disabled read-through and write-through modes. */ + @Test public void testTransactionalUpdate() { testTransactionalUpdate(OPTIMISTIC, READ_COMMITTED); testTransactionalUpdate(OPTIMISTIC, REPEATABLE_READ); @@ -112,6 +120,7 @@ public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends C /** * Tests {@link IgniteCache#remove(Object)} with disabled read-through and write-through modes. */ + @Test public void testTransactionalRemove() { testTransactionalRemove(OPTIMISTIC, READ_COMMITTED); testTransactionalRemove(OPTIMISTIC, REPEATABLE_READ); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java index d8913dc..8ee347c 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ import static org.apache.ignite.cache.CachePeekMode.PRIMARY; * Checks that once value is read from store, it will be loaded in * backups as well. */ +@RunWith(JUnit4.class) public class CacheStoreReadFromBackupTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "cache"; @@ -100,6 +104,7 @@ public class CacheStoreReadFromBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { cacheMode = REPLICATED; backups = 0; @@ -111,6 +116,7 @@ public class CacheStoreReadFromBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { cacheMode = PARTITIONED; backups = 1; @@ -122,6 +128,7 @@ public class CacheStoreReadFromBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearReplicated() throws Exception { cacheMode = REPLICATED; backups = 0; @@ -133,6 +140,7 @@ public class CacheStoreReadFromBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearPartitioned() throws Exception { cacheMode = PARTITIONED; backups = 1; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java index 412a879..01cecaf 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java @@ -36,10 +36,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.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for store session listeners. */ +@RunWith(JUnit4.class) public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridCommonAbstractTest implements Serializable { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -109,6 +113,7 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testAtomicCache() throws Exception { CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(DEFAULT_CACHE_NAME, CacheAtomicityMode.ATOMIC); @@ -134,6 +139,7 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testTransactionalCache() throws Exception { CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(DEFAULT_CACHE_NAME, CacheAtomicityMode.TRANSACTIONAL); @@ -159,6 +165,7 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testExplicitTransaction() throws Exception { CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(DEFAULT_CACHE_NAME, CacheAtomicityMode.TRANSACTIONAL); @@ -184,6 +191,7 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testCrossCacheTransaction() throws Exception { CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL); CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL); @@ -212,6 +220,7 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testCommit() throws Exception { write.set(true); @@ -241,6 +250,7 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testRollback() throws Exception { write.set(true); fail.set(true); @@ -329,4 +339,4 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm * @return Session listener factory. */ protected abstract Factory<CacheStoreSessionListener> sessionListenerFactory(); -} \ 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/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java index 9bc3cdc..63a9637 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Store session listeners test. */ +@RunWith(JUnit4.class) public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -83,6 +87,7 @@ public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testNoCaches() throws Exception { try { startGrid(); @@ -98,6 +103,7 @@ public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testNoOverride() throws Exception { try { Ignite ignite = startGrid(); @@ -160,6 +166,7 @@ public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testPartialOverride() throws Exception { try { Ignite ignite = startGrid(); @@ -235,6 +242,7 @@ public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testOverride() throws Exception { try { Ignite ignite = startGrid(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java index 774d4f7..70f6a9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class tests that redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * and {@link CacheStoreSessionListener#onSessionEnd(CacheStoreSession, boolean)} are not executed. */ +@RunWith(JUnit4.class) public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -81,6 +85,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testLookup() throws Exception { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -97,6 +102,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testBatchLookup() throws Exception { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -117,6 +123,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testUpdate() throws Exception { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -133,6 +140,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testBatchUpdate() throws Exception { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -153,6 +161,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -174,6 +183,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testBatchRemove() throws Exception { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java index 3ba4ec2..db54375 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java @@ -44,6 +44,10 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore; import org.apache.ignite.resources.CacheStoreSessionResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.apache.ignite.testframework.MvccFeatureChecker; /** @@ -51,6 +55,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; * and {@link CacheStoreSessionListener#onSessionEnd(CacheStoreSession, boolean)} are executed from * {@link GridCacheWriteBehindStore} only. */ +@RunWith(JUnit4.class) public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAbstractSelfTest { /** */ protected static final int CNT = 100; @@ -68,6 +73,7 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb private static final AtomicInteger uninitializedListenerCnt = new AtomicInteger(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -114,6 +120,7 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb * Tests that there are no redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * while {@link IgniteCache#get(Object)} performed. */ + @Test public void testLookup() { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -127,6 +134,7 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb * Tests that there are no redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * while {@link IgniteCache#put(Object, Object)} performed. */ + @Test public void testUpdate() { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -140,6 +148,7 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb * Tests that there are no redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * while {@link IgniteCache#remove(Object)} performed. */ + @Test public void testRemove() { IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -153,6 +162,7 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb /** * Tests that cache store session listeners are notified by write-behind store. */ + @Test public void testFlushSingleValue() throws Exception { CacheConfiguration cfg = cacheConfiguration(getTestIgniteInstanceName()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java index fce1f5d..ec6c72b 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; 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; /** * This class tests handling exceptions from {@link CacheStore#write(Cache.Entry)}. */ +@RunWith(JUnit4.class) public class CacheStoreWriteErrorTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "cache"; @@ -60,6 +64,7 @@ public class CacheStoreWriteErrorTest extends GridCommonAbstractTest { /** * Checks primary error while saving batch with one entry. */ + @Test public void testPrimaryErrorForBatchSize1() { checkPrimaryError(1); } @@ -67,6 +72,7 @@ public class CacheStoreWriteErrorTest extends GridCommonAbstractTest { /** * Checks primary error while saving batch with two entries. */ + @Test public void testPrimaryErrorForBatchSize2() { checkPrimaryError(2); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java index d1e33b6..067399e 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java @@ -43,14 +43,19 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.testframework.GridTestUtils; 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; /** * Store test. */ +@RunWith(JUnit4.class) public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoads() throws Exception { final int range = 300; @@ -127,6 +132,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoad() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -138,6 +144,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoadCustomThreshold() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -179,6 +186,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoadAll() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -190,6 +198,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoadAllCustomThreshold() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java index 6273d6f..3d89486 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.MvccFeatureChecker; 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 GridCacheLoadOnlyStoreAdapterSelfTest extends GridCommonAbstractTest { /** Expected loadAll arguments, hardcoded on call site for convenience. */ private static final Integer[] EXP_ARGS = {1, 2, 3}; @@ -80,6 +84,7 @@ public class GridCacheLoadOnlyStoreAdapterSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testStore() throws Exception { int inputSize = 100; @@ -95,6 +100,7 @@ public class GridCacheLoadOnlyStoreAdapterSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testStoreSmallQueueSize() throws Exception { int inputSize = 1500; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java index d88c431..2292d30 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test checks that local cacheLoad task never blocks remote * cacheLoad. */ +@RunWith(JUnit4.class) public class GridStoreLoadCacheTest extends GridCommonAbstractTest { /** Barrier. */ private static final CyclicBarrier BARRIER = new CyclicBarrier(3); @@ -61,6 +65,7 @@ public class GridStoreLoadCacheTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test() throws Exception { for (int i = 0; i < 3; i++) { IgniteEx srv1 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java index cdc4277..22d9211 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.typedef.PA; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test check that cache values removes from cache on expiry. */ +@RunWith(JUnit4.class) public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTest { /** Expected time to live in milliseconds. */ private static final int TIME_TO_LIVE = 1000; @@ -79,6 +83,7 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithExpiry() throws Exception { checkLoad(false); } @@ -86,6 +91,7 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithExpiryAsync() throws Exception { checkLoad(true); } @@ -119,6 +125,7 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testLocalLoadCacheWithExpiry() throws Exception { checkLocalLoad(false); } @@ -126,6 +133,7 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testLocalLoadCacheWithExpiryAsync() throws Exception { checkLocalLoad(true); } @@ -159,6 +167,7 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testLoadAllWithExpiry() throws Exception { IgniteCache<Integer, Integer> cache = ignite(0).<Integer, Integer>cache(DEFAULT_CACHE_NAME) .withExpiryPolicy(new CreatedExpiryPolicy(new Duration(MILLISECONDS, TIME_TO_LIVE))); @@ -239,4 +248,4 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes // No-op. } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java index f043746..2ec4f50 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; import org.apache.ignite.testframework.junits.common.*; import javax.cache.configuration.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test resource injection. */ +@RunWith(JUnit4.class) public class StoreResourceInjectionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public class StoreResourceInjectionSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testResourcesInStoreFactory() throws Exception { cacheCfg.setCacheStoreFactory(new MyCacheStoreFactory()); @@ -71,6 +76,7 @@ public class StoreResourceInjectionSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testResourcesInLoaderFactory() throws Exception { cacheCfg.setCacheLoaderFactory(new MyCacheStoreFactory()); @@ -80,6 +86,7 @@ public class StoreResourceInjectionSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testResourcesInWriterFactory() throws Exception { cacheCfg.setCacheWriterFactory(new MyCacheStoreFactory()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java index 2095824..9011573 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -51,6 +54,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Class for {@link CacheJdbcPojoStore} tests. */ +@RunWith(JUnit4.class) public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -378,6 +382,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithStatement() throws Exception { startTestGrid(false, false, false, false, 512); @@ -387,6 +392,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithStatementTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -396,6 +402,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { startTestGrid(false, false, false, false, 512); @@ -405,6 +412,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCacheAll() throws Exception { startTestGrid(false, false, false, false, ORGANIZATION_CNT + PERSON_CNT + 1); @@ -414,6 +422,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithSql() throws Exception { startTestGrid(false, false, false, false, 512); @@ -423,6 +432,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCacheTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -432,6 +442,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithSqlTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -441,6 +452,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCachePrimitiveKeys() throws Exception { startTestGrid(true, false, false, false, 512); @@ -450,6 +462,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadCachePrimitiveKeysTx() throws Exception { startTestGrid(true, false, false, true, 512); @@ -540,6 +553,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutRemoveBuiltIn() throws Exception { startTestGrid(true, false, false, false, 512); @@ -549,6 +563,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutRemove() throws Exception { startTestGrid(false, false, false, false, 512); @@ -558,6 +573,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutRemoveTxBuiltIn() throws Exception { startTestGrid(true, false, false, true, 512); @@ -567,6 +583,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testPutRemoveTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -576,6 +593,7 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testLoadNotRegisteredType() throws Exception { startTestGrid(false, false, false, false, 512); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java index b6d6fe1..b95ed24 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java @@ -19,10 +19,14 @@ package org.apache.ignite.cache.store.jdbc; import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.internal.binary.BinaryMarshaller; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link CacheJdbcPojoStore} with binary marshaller. */ +@RunWith(JUnit4.class) public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest { /** {@inheritDoc} */ @Override protected Marshaller marshaller(){ @@ -32,6 +36,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyClasses() throws Exception { startTestGrid(false, true, false, false, 512); @@ -41,6 +46,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyClassesTx() throws Exception { startTestGrid(false, true, false, true, 512); @@ -50,6 +56,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoValueClasses() throws Exception { startTestGrid(false, false, true, false, 512); @@ -59,6 +66,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoValueClassesTx() throws Exception { startTestGrid(false, false, true, true, 512); @@ -68,6 +76,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyAndValueClasses() throws Exception { startTestGrid(false, true, true, false, 512); @@ -77,6 +86,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyAndValueClassesTx() throws Exception { startTestGrid(false, true, true, true, 512); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java index ea2808f..f2db5df 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java @@ -50,10 +50,14 @@ import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.cache.GridAbstractCacheStoreSelfTest; import org.h2.jdbcx.JdbcConnectionPool; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class for {@code PojoCacheStore} tests. */ +@RunWith(JUnit4.class) public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<CacheJdbcPojoStore<Object, Object>> { /** DB connection URL. */ private static final String DFLT_CONN_URL = "jdbc:h2:mem:autoCacheStore;DB_CLOSE_DELAY=-1"; @@ -269,6 +273,7 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { Connection conn = store.openConnection(false); @@ -442,6 +447,7 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache /** * @throws Exception If failed. */ + @Test public void testParallelLoad() throws Exception { Connection conn = store.openConnection(false); @@ -503,6 +509,7 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache /** * @throws Exception If failed. */ + @Test public void testWriteRetry() throws Exception { CacheJdbcPojoStore<Object, Object> store = store(); @@ -556,6 +563,7 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { Timestamp k = new Timestamp(System.currentTimeMillis()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java index b1f8cd3..298e5a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java @@ -48,6 +48,9 @@ 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.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.BeansException; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; @@ -61,6 +64,7 @@ import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsyn /** * */ +@RunWith(JUnit4.class) public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends CacheAbstractJdbcStore> extends GridCommonAbstractTest { /** Default config with mapping. */ @@ -195,6 +199,7 @@ public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends Cach /** * @throws Exception If failed. */ + @Test public void testMultithreadedPut() throws Exception { IgniteInternalFuture<?> fut1 = runMultiThreadedAsync(new Callable<Object>() { private final Random rnd = new Random(); @@ -243,6 +248,7 @@ public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends Cach /** * @throws Exception If failed. */ + @Test public void testMultithreadedPutAll() throws Exception { multithreaded(new Callable<Object>() { private final Random rnd = new Random(); @@ -285,6 +291,7 @@ public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends Cach /** * @throws Exception If failed. */ + @Test public void testMultithreadedExplicitTx() throws Exception { runMultiThreaded(new Callable<Object>() { private final Random rnd = new Random(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java index 9eaedbf..dfdfc18 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -53,6 +56,7 @@ import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsyn /** * */ +@RunWith(JUnit4.class) public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -128,6 +132,7 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testMultithreadedPut() throws Exception { IgniteInternalFuture<?> fut1 = runMultiThreadedAsync(new Callable<Object>() { private final Random rnd = new Random(); @@ -166,6 +171,7 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testMultithreadedPutAll() throws Exception { runMultiThreaded(new Callable<Object>() { private final Random rnd = new Random(); @@ -192,6 +198,7 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testMultithreadedExplicitTx() throws Exception { runMultiThreaded(new Callable<Object>() { private final Random rnd = new Random(); @@ -270,4 +277,4 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr assertEquals(opened, closed); } } -} \ 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/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java index 5e490f7..a1d5690 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java @@ -28,14 +28,19 @@ import java.sql.Time; import java.sql.Timestamp; import java.util.UUID; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link JdbcTypesDefaultTransformer}. */ +@RunWith(JUnit4.class) public class JdbcTypesDefaultTransformerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTransformer() throws Exception { // Connection to H2. String jdbcUrl = "jdbc:h2:mem:JdbcTypesDefaultTransformerTest"; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java b/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java index eb577c4..132f0d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.ssl.SslContextFactory; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cases when node connects to cluster with different set of cipher suites. */ +@RunWith(JUnit4.class) public class SslParametersTest extends GridCommonAbstractTest { public static final String TEST_CACHE_NAME = "TEST"; @@ -91,6 +95,7 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSameCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", @@ -115,6 +120,7 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOneCommonCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_RSA_WITH_AES_128_GCM_SHA256", @@ -122,7 +128,7 @@ public class SslParametersTest extends GridCommonAbstractTest { }; startGrid(); - + checkSuccessfulClientStart( new String[][] { new String[] { @@ -137,13 +143,14 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoCommonCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_RSA_WITH_AES_128_GCM_SHA256" }; startGrid(); - + checkClientStartFailure( new String[][] { new String[] { @@ -158,13 +165,14 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNonExistentCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_RSA_WITH_AES_128_GCM_SHA256" }; startGrid(); - + checkClientStartFailure( new String[][] { new String[] { @@ -181,6 +189,7 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoCommonProtocols() throws Exception { protocols = new String[] { "TLSv1.1", @@ -203,6 +212,7 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNonExistentProtocol() throws Exception { protocols = new String[] { "SSLv3" @@ -226,6 +236,7 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSameProtocols() throws Exception { protocols = new String[] { "TLSv1.1", @@ -247,6 +258,7 @@ public class SslParametersTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOneCommonProtocol() throws Exception { protocols = new String[] { "TLSv1",