http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java index 8d84f54..4d9e354 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; 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; /** * Tests for TreeMap and TreeSet structures. */ +@RunWith(JUnit4.class) public class BinaryTreeSelfTest extends GridCommonAbstractTest { /** Data structure size. */ private static final int SIZE = 100; @@ -69,6 +73,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueRegularNoComparator() throws Exception { checkTreeMapAsValue(false, false); } @@ -78,6 +83,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueRegularComparator() throws Exception { checkTreeMapAsValue(false, true); } @@ -87,6 +93,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueBinaryNoComparator() throws Exception { checkTreeMapAsValue(true, false); } @@ -96,6 +103,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueBinaryComparator() throws Exception { checkTreeMapAsValue(true, true); } @@ -105,6 +113,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsKeyNoComparator() throws Exception { checkTreeMapAsKey(false); } @@ -114,6 +123,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsKeyComparator() throws Exception { checkTreeMapAsKey(true); } @@ -224,6 +234,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueRegularNoComparator() throws Exception { checkTreeSetAsValue(false, false); } @@ -233,6 +244,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueRegularComparator() throws Exception { checkTreeSetAsValue(false, true); } @@ -242,6 +254,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueBinaryNoComparator() throws Exception { checkTreeSetAsValue(true, false); } @@ -251,6 +264,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueBinaryComparator() throws Exception { checkTreeSetAsValue(true, true); } @@ -260,6 +274,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeSetAsKeyNoComparator() throws Exception { checkTreeSetAsKey(false); } @@ -269,6 +284,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeSetAsKeyComparator() throws Exception { checkTreeSetAsKey(true); }
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java index 345f24d..97e0fdd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java @@ -40,12 +40,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test for binary object affinity key. */ +@RunWith(JUnit4.class) public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { /** */ private static final AtomicReference<UUID> nodeId = new AtomicReference<>(); @@ -98,6 +102,7 @@ public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { checkAffinity(grid(0)); @@ -167,6 +172,7 @@ public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { Affinity<Object> aff = grid(0).affinity(DEFAULT_CACHE_NAME); @@ -200,6 +206,7 @@ public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { Affinity<Object> aff = grid(0).affinity(DEFAULT_CACHE_NAME); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java index bb7c65d..ac0fa00 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java @@ -34,14 +34,19 @@ import org.apache.ignite.logger.NullLogger; import org.apache.ignite.marshaller.MarshallerContext; import org.apache.ignite.marshaller.jdk.JdkMarshaller; 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 GridBinaryMarshallerCtxDisabledSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testObjectExchange() throws Exception { BinaryMarshaller marsh = new BinaryMarshaller(); marsh.setContext(new MarshallerContextWithNoStorage()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java index 0449070..c378870 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.logger.NullLogger; import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Wildcards test. */ +@RunWith(JUnit4.class) public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** */ public static final String CLASS1_FULL_NAME = GridBinaryTestClass1.class.getName(); @@ -54,6 +58,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesFullNameMapper() throws Exception { checkClassNames(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -61,6 +66,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesSimpleNameMapper() throws Exception { checkClassNames(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -68,6 +74,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesMixedMappers() throws Exception { checkClassNames(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(true)); } @@ -97,6 +104,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesCustomMappers() throws Exception { BinaryMarshaller marsh = binaryMarshaller(null, new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -132,6 +140,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsSimpleNameIdMapper() throws Exception { checkTypeConfigurations(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -139,6 +148,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsFullNameIdMapper() throws Exception { checkTypeConfigurations(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -184,6 +194,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithGlobalMapper() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -219,6 +230,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithNonGlobalMapper() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(true), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -254,6 +266,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverrideIdMapperSimpleNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -261,6 +274,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverrideIdMapperFullNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -307,6 +321,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverrideNameMapperSimpleNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -314,6 +329,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverrideNameMapperFullNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -360,6 +376,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesJarFullNameMapper() throws Exception { checkClassNamesJar(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -367,6 +384,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesJarSimpleNameMapper() throws Exception { checkClassNamesJar(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -396,6 +414,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesWithCustomMapperJar() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -431,6 +450,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsJarSimpleNameMapper() throws Exception { checkTypeConfigurationJar(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -438,6 +458,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsJarFullNameMapper() throws Exception { checkTypeConfigurationJar(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -468,6 +489,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithGlobalMapperJar() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -503,6 +525,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithNonGlobalMapperJar() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -538,6 +561,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverrideJarSimpleNameMapper() throws Exception { checkOverrideJar(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -545,6 +569,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverrideJarFullNameMapper() throws Exception { checkOverrideJar(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java index 39ffa29..2b31d3a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.binary.BinaryRawWriter; import org.apache.ignite.binary.BinaryReader; import org.apache.ignite.binary.BinaryWriter; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Binary meta data test. */ +@RunWith(JUnit4.class) public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAbstractTest { /** */ private static IgniteConfiguration cfg; @@ -94,6 +98,7 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { binaries().toBinary(new TestObject2()); @@ -154,6 +159,7 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testNoConfiguration() throws Exception { binaries().toBinary(new TestObject3()); @@ -163,6 +169,7 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testReflection() throws Exception { BinaryType meta = binaries().type(TestObject1.class); @@ -207,6 +214,7 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testBinaryMarshalAware() throws Exception { binaries().toBinary(new TestObject2()); @@ -240,6 +248,7 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testMerge() throws Exception { binaries().toBinary(new TestObject2()); @@ -281,6 +290,7 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testSerializedObject() throws Exception { TestObject1 obj = new TestObject1(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java index c68a886..e857ef2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java @@ -20,6 +20,9 @@ package org.apache.ignite.internal.binary.streams; import java.util.Random; 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; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -31,6 +34,7 @@ import static org.apache.ignite.GridTestIoUtils.getShortByByteLE; /** * Binary input/output streams byte order sanity tests. */ +@RunWith(JUnit4.class) public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAbstractTest { /** Array length. */ protected static final int ARR_LEN = 16; @@ -64,6 +68,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { short val = (short)RND.nextLong(); @@ -109,6 +114,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { short[] arr = new short[ARR_LEN]; @@ -128,6 +134,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testChar() throws Exception { char val = (char)RND.nextLong(); @@ -157,6 +164,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { char[] arr = new char[ARR_LEN]; @@ -176,6 +184,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testInt() throws Exception { int val = RND.nextInt(); @@ -228,6 +237,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { int[] arr = new int[ARR_LEN]; @@ -247,6 +257,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { long val = RND.nextLong(); @@ -283,6 +294,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { long[] arr = new long[ARR_LEN]; @@ -302,6 +314,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { float val = RND.nextFloat(); @@ -330,6 +343,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { float[] arr = new float[ARR_LEN]; @@ -349,6 +363,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { double val = RND.nextDouble(); @@ -377,6 +392,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { double[] arr = new double[ARR_LEN]; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java index ed1d3d6..7ee9c74 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java @@ -18,14 +18,19 @@ package org.apache.ignite.internal.binary.streams; 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 BinaryAbstractOutputStreamTest extends GridCommonAbstractTest { /** * */ + @Test public void testCapacity() { assertEquals(256, BinaryAbstractOutputStream.capacity(0, 1)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index e5ff639..fccbdae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -27,6 +27,11 @@ import org.apache.ignite.internal.visor.tx.VisorTxOperation; import org.apache.ignite.internal.visor.tx.VisorTxProjection; import org.apache.ignite.internal.visor.tx.VisorTxSortOrder; import org.apache.ignite.internal.visor.tx.VisorTxTaskArg; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ENABLE_EXPERIMENTAL_COMMAND; @@ -43,15 +48,18 @@ import static org.junit.Assert.assertArrayEquals; /** * Tests Command Handler parsing arguments. */ +@RunWith(JUnit4.class) public class CommandHandlerParsingTest extends TestCase { /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { System.setProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND, "true"); super.setUp(); } /** {@inheritDoc} */ + @After @Override public void tearDown() throws Exception { System.clearProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND); @@ -61,6 +69,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * validate_indexes command arguments parsing and validation */ + @Test public void testValidateIndexArguments() { CommandHandler hnd = new CommandHandler(); @@ -143,6 +152,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * Test that experimental command (i.e. WAL command) is disabled by default. */ + @Test public void testExperimentalCommandIsDisabled() { System.clearProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND); @@ -170,6 +180,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * Tests parsing and validation for the SSL arguments. */ + @Test public void testParseAndValidateSSLArguments() { CommandHandler hnd = new CommandHandler(); @@ -208,6 +219,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * Tests parsing and validation for user and password arguments. */ + @Test public void testParseAndValidateUserAndPassword() { CommandHandler hnd = new CommandHandler(); @@ -244,6 +256,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * Tests parsing and validation of WAL commands. */ + @Test public void testParseAndValidateWalActions() { CommandHandler hnd = new CommandHandler(); @@ -283,6 +296,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * Tests that the auto confirmation flag was correctly parsed. */ + @Test public void testParseAutoConfirmationFlag() { CommandHandler hnd = new CommandHandler(); @@ -344,6 +358,7 @@ public class CommandHandlerParsingTest extends TestCase { * Tests host and port arguments. * Tests connection settings arguments. */ + @Test public void testConnectionSettings() { CommandHandler hnd = new CommandHandler(); @@ -398,6 +413,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * test parsing dump transaction arguments */ + @Test public void testTransactionArguments() { CommandHandler hnd = new CommandHandler(); Arguments args; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java index 710e445..74e9f0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java @@ -29,6 +29,10 @@ import org.apache.ignite.internal.util.GridUnsafe; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.plugin.extensions.communication.MessageFactory; import org.jetbrains.annotations.Nullable; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -41,6 +45,7 @@ import static org.junit.Assert.assertArrayEquals; /** * {@link DirectByteBufferStreamImplV2} byte order sanity tests. */ +@RunWith(JUnit4.class) public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** Array length. */ private static final int ARR_LEN = 16; @@ -61,6 +66,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { private byte[] outArr; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { super.setUp(); @@ -92,6 +98,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testShortArray() { short[] arr = new short[ARR_LEN]; @@ -111,6 +118,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testCharArray() { char[] arr = new char[ARR_LEN]; @@ -130,6 +138,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testIntArray() { int[] arr = new int[ARR_LEN]; @@ -149,6 +158,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testLongArray() { long[] arr = new long[ARR_LEN]; @@ -168,6 +178,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testFloatArray() { float[] arr = new float[ARR_LEN]; @@ -187,6 +198,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testDoubleArray() { double[] arr = new double[ARR_LEN]; @@ -206,6 +218,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testCharArrayInternal() { char[] arr = new char[ARR_LEN]; @@ -226,6 +239,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testShortArrayInternal() { short[] arr = new short[ARR_LEN]; @@ -246,6 +260,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testIntArrayInternal() { int[] arr = new int[ARR_LEN]; @@ -266,6 +281,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testLongArrayInternal() { long[] arr = new long[ARR_LEN]; @@ -286,6 +302,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testFloatArrayInternal() { float[] arr = new float[ARR_LEN]; @@ -306,6 +323,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** * */ + @Test public void testDoubleArrayInternal() { double[] arr = new double[ARR_LEN]; @@ -519,4 +537,4 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { else throw new IllegalArgumentException("Unsupported array type"); } -} \ 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/encryption/EncryptedCacheBigEntryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java index deb72e4..a72e93e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; 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 org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests to check encryption of entry bigger then page size. */ +@RunWith(JUnit4.class) public class EncryptedCacheBigEntryTest extends AbstractEncryptionTest { /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { @@ -47,6 +51,7 @@ public class EncryptedCacheBigEntryTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCacheWithBigEntry() throws Exception { T2<IgniteEx, IgniteEx> grids = startTestGrids(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java index d9958e4..33a5636 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java @@ -33,8 +33,12 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheCreateTest extends AbstractEncryptionTest { /** Non-persistent data region name. */ private static final String NO_PERSISTENCE_REGION = "no-persistence-region"; @@ -74,6 +78,7 @@ public class EncryptedCacheCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCache() throws Exception { CacheConfiguration<Long, String> ccfg = new CacheConfiguration<>(ENCRYPTED_CACHE); @@ -95,6 +100,7 @@ public class EncryptedCacheCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedNotPersistedCacheFail() throws Exception { GridTestUtils.assertThrowsWithCause(() -> { CacheConfiguration<Long, String> ccfg = new CacheConfiguration<>(NO_PERSISTENCE_REGION); @@ -107,6 +113,7 @@ public class EncryptedCacheCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testPersistedContentEncrypted() throws Exception { IgniteCache<Integer, String> enc = grid(0).createCache( new CacheConfiguration<Integer, String>(ENCRYPTED_CACHE) http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java index 11855ec..cfbe642 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaS import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.managers.encryption.GridEncryptionManager.ENCRYPTION_KEY_PREFIX; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheDestroyTest extends AbstractEncryptionTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { @@ -39,6 +43,7 @@ public class EncryptedCacheDestroyTest extends AbstractEncryptionTest { /** * @throws Exception If failed. */ + @Test public void testEncryptedCacheDestroy() throws Exception { T2<IgniteEx, IgniteEx> grids = startTestGrids(true); @@ -62,6 +67,7 @@ public class EncryptedCacheDestroyTest extends AbstractEncryptionTest { /** * @throws Exception If failed. */ + @Test public void testEncryptedCacheFromGroupDestroy() throws Exception { T2<IgniteEx, IgniteEx> grids = startTestGrids(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java index 56f578d..6a7bf83 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java @@ -25,9 +25,13 @@ import org.apache.ignite.internal.processors.cache.IgniteInternalCache; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheGroupCreateTest extends AbstractEncryptionTest { /** */ public static final String ENCRYPTED_GROUP = "encrypted-group"; @@ -53,6 +57,7 @@ public class EncryptedCacheGroupCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCacheGroup() throws Exception { KeystoreEncryptionKey key = createEncryptedCache(ENCRYPTED_CACHE, ENCRYPTED_GROUP); @@ -78,6 +83,7 @@ public class EncryptedCacheGroupCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateNotEncryptedCacheInEncryptedGroupFails() throws Exception { createEncryptedCache(ENCRYPTED_CACHE + "3", ENCRYPTED_GROUP + "3"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java index 41a250c..cca156a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { /** */ private static final String GRID_2 = "grid-2"; @@ -105,6 +109,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testNodeCantJoinWithoutEncryptionSpi() throws Exception { startGrid(GRID_0); @@ -119,6 +124,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testNodeCantJoinWithDifferentKeyStore() throws Exception { startGrid(GRID_0); @@ -133,6 +139,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testNodeCanJoin() throws Exception { startGrid(GRID_0); @@ -140,6 +147,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testNodeCantJoinWithDifferentCacheKeys() throws Exception { IgniteEx grid0 = startGrid(GRID_0); startGrid(GRID_3); @@ -168,6 +176,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testThirdNodeCanJoin() throws Exception { IgniteEx grid0 = startGrid(GRID_0); @@ -187,6 +196,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testClientNodeJoin() throws Exception { IgniteEx grid0 = startGrid(GRID_0); @@ -200,6 +210,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testNodeCantJoinWithSameNameButNotEncCache() throws Exception { configureCache = true; @@ -218,6 +229,7 @@ public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { } /** */ + @Test public void testNodeCantJoinWithSameNameButEncCache() throws Exception { configureCache = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java index 2e13340..58e2c3d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java @@ -22,8 +22,12 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCachePreconfiguredRestartTest extends EncryptedCacheRestartTest { /** */ private boolean differentCachesOnNodes; @@ -41,6 +45,7 @@ public class EncryptedCachePreconfiguredRestartTest extends EncryptedCacheRestar } /** @throws Exception If failed. */ + @Test public void testDifferentPreconfiguredCachesOnNodes() throws Exception { differentCachesOnNodes = true; @@ -48,6 +53,7 @@ public class EncryptedCachePreconfiguredRestartTest extends EncryptedCacheRestar } /** {@inheritDoc} */ + @Test @Override public void testCreateEncryptedCache() throws Exception { differentCachesOnNodes = false; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java index 2b01072..638fc53 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java @@ -21,8 +21,12 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheRestartTest extends AbstractEncryptionTest { /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { @@ -37,6 +41,7 @@ public class EncryptedCacheRestartTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCache() throws Exception { T2<IgniteEx, IgniteEx> grids = startTestGrids(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java index b88eef9..a4ed6d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; 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 java.util.concurrent.TimeUnit.NANOSECONDS; @@ -45,6 +48,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; /** * Test Managers to add and remove local message listener. */ +@RunWith(JUnit4.class) public class GridManagerLocalMessageListenerSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -85,6 +89,7 @@ public class GridManagerLocalMessageListenerSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testSendMessage() throws Exception { startGridsMultiThreaded(2); @@ -121,6 +126,7 @@ public class GridManagerLocalMessageListenerSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testAddLocalMessageListener() throws Exception { startGrid(); @@ -136,6 +142,7 @@ public class GridManagerLocalMessageListenerSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testRemoveLocalMessageListener() throws Exception { startGrid(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java index 0276abd..403c152 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java @@ -28,6 +28,11 @@ import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.jetbrains.annotations.NotNull; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -39,6 +44,7 @@ import static org.mockito.Mockito.when; * * Test modifies static final field, used only for development */ +@RunWith(JUnit4.class) public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { /** Original value of {@link GridDiscoveryManager#mem} to be restored after test */ private Object mxBeanToRestore; @@ -50,6 +56,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { private boolean correctSetupOfTestPerformed; /** {@inheritDoc} Changes field to always failing mock */ + @Before @Override public void setUp() throws Exception { super.setUp(); try { @@ -95,6 +102,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { * * @throws Exception if field set failed */ + @After @Override public void tearDown() throws Exception { super.tearDown(); if (correctSetupOfTestPerformed) @@ -102,6 +110,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { } /** Creates minimal disco manager mock, checks illegal state is not propagated */ + @Test public void testIllegalStateIsCatch() { final IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setDiscoverySpi(new TcpDiscoverySpi()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java index a8f96ea..531cc9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java @@ -46,11 +46,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Managers stop test. * */ +@RunWith(JUnit4.class) public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** Kernal context. */ private GridTestKernalContext ctx; @@ -87,6 +91,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopCheckpointManager() throws Exception { SharedFsCheckpointSpi spi = new SharedFsCheckpointSpi(); @@ -102,6 +107,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopCollisionManager() throws Exception { CollisionSpi spi = new FifoQueueCollisionSpi(); @@ -117,6 +123,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopCommunicationManager() throws Exception { CommunicationSpi spi = new TcpCommunicationSpi(); @@ -135,6 +142,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopDeploymentManager() throws Exception { DeploymentSpi spi = new LocalDeploymentSpi(); @@ -150,6 +158,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopDiscoveryManager() throws Exception { DiscoverySpi spi = new TcpDiscoverySpi(); @@ -165,6 +174,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopEventStorageManager() throws Exception { EventStorageSpi spi = new MemoryEventStorageSpi(); @@ -180,6 +190,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopFailoverManager() throws Exception { AlwaysFailoverSpi spi = new AlwaysFailoverSpi(); @@ -195,6 +206,7 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopLoadBalancingManager() throws Exception { RoundRobinLoadBalancingSpi spi = new RoundRobinLoadBalancingSpi(); @@ -206,4 +218,4 @@ public class GridManagerStopSelfTest extends GridCommonAbstractTest { mgr.stop(true); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java index 795bda4..4146c2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java @@ -27,14 +27,19 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.GridTestKernalContext; 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; /** * Tests manager with {@link org.apache.ignite.spi.IgniteSpiNoop} SPI's. */ +@RunWith(JUnit4.class) public class GridNoopManagerSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testEnabledManager() throws IgniteCheckedException { GridTestKernalContext ctx = new GridTestKernalContext(new GridStringLogger()); @@ -96,4 +101,4 @@ public class GridNoopManagerSelfTest extends GridCommonAbstractTest { private static class NoopSpi extends Spi { // No-op. } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java index 4f6db6a..4ff4cfd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java @@ -54,6 +54,9 @@ import org.apache.ignite.testframework.LogListener; 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.IgniteSystemProperties.IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -67,6 +70,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -123,6 +127,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDiagnosticMessages1() throws Exception { checkBasicDiagnosticInfo(CacheAtomicityMode.TRANSACTIONAL); } @@ -130,6 +135,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDiagnosticMessagesMvcc1() throws Exception { checkBasicDiagnosticInfo(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT); } @@ -137,6 +143,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDiagnosticMessages2() throws Exception { connectionsPerNode = 5; @@ -146,6 +153,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDiagnosticMessagesMvcc2() throws Exception { connectionsPerNode = 5; @@ -155,6 +163,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLongRunning() throws Exception { checkLongRunning(TRANSACTIONAL); } @@ -162,6 +171,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLongRunningMvcc() throws Exception { checkLongRunning(TRANSACTIONAL_SNAPSHOT); } @@ -239,6 +249,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSeveralLongRunningMvccTxs() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9322"); // Fix diagnostic message or disable test. @@ -248,6 +259,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSeveralLongRunningTxs() throws Exception { checkSeveralLongRunningTxs(TRANSACTIONAL); } @@ -360,6 +372,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLongRunningMvccTx() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9322"); // Fix diagnostic message or disable test. @@ -369,6 +382,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLongRunningTx() throws Exception { checkLongRunningTx(TRANSACTIONAL); @@ -472,6 +486,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteTx() throws Exception { checkRemoteTx(TRANSACTIONAL); } @@ -479,6 +494,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteMvccTx() throws Exception { checkRemoteTx(TRANSACTIONAL_SNAPSHOT); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java index 414d05c..beb3ce2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java @@ -18,15 +18,20 @@ package org.apache.ignite.internal.managers.checkpoint; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Checkpoint Manager") +@RunWith(JUnit4.class) public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstractSelfTest { /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testCacheBased() throws Exception { doTest("cache"); } @@ -34,6 +39,7 @@ public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstract /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testSharedFsBased() throws Exception { doTest("sharedfs"); } @@ -41,6 +47,7 @@ public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstract /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testDatabaseBased() throws Exception { doTest("jdbc"); } @@ -48,6 +55,7 @@ public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstract /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testMultiNodeCacheBased() throws Exception { doMultiNodeTest("cache"); } @@ -55,6 +63,7 @@ public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstract /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testMultiNodeSharedFsBased() throws Exception { doMultiNodeTest("sharedfs"); } @@ -62,7 +71,8 @@ public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstract /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testMultiNodeDatabaseBased() throws Exception { doMultiNodeTest("jdbc"); } -} \ 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/managers/checkpoint/GridCheckpointTaskSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java index e36f54a..dade965 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java @@ -42,6 +42,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.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -49,6 +52,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Checkpoint tests. */ +@RunWith(JUnit4.class) public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -122,6 +126,7 @@ public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFailover() throws Exception { grid(1).compute().execute(FailoverTestTask.class, null); } @@ -129,6 +134,7 @@ public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReduce() throws Exception { grid(1).compute().execute(ReduceTestTask.class, null); } @@ -238,4 +244,4 @@ public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest { return null; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java index 8b69c19..fb5e292 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.internal.util.typedef.P2; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid communication manager self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstractTest { /** */ public GridCommunicationManagerListenersSelfTest() { @@ -47,6 +51,7 @@ public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstrac /** * Works fine. */ + @Test public void testDifferentListeners() { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -67,6 +72,7 @@ public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstrac /** * Fails on the 1001st time. */ + @Test public void testMultipleExecutionsWithoutListeners() { checkLoop(1001); } @@ -75,6 +81,7 @@ public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstrac * This is the workaround- as long as we keep a message listener in * the stack, our FIFO bug isn't exposed. Comment above out to see. */ + @Test public void testOneListener() { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -99,6 +106,7 @@ public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstrac * Now, our test will fail on the first message added after our safety * message listener has been removed. */ + @Test public void testSingleExecutionWithoutListeners() { checkLoop(1); } @@ -161,4 +169,4 @@ public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstrac // No-op. } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java index 3563c77..d1cc425 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java @@ -30,6 +30,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 java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; @@ -38,6 +41,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; /** * Send message test. */ +@RunWith(JUnit4.class) public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -87,6 +91,7 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testSendMessage() throws Exception { try { startGridsMultiThreaded(2); @@ -101,6 +106,7 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testSendMessageOverByteId() throws Exception { try { startGridsMultiThreaded(2); @@ -115,6 +121,7 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testSendMessageWithBuffer() throws Exception { bufSize = 8192; @@ -233,4 +240,4 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java index 9f447df..84017f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.ArgumentMatcher; import org.mockito.Mockito; @@ -50,6 +53,7 @@ import static org.mockito.Mockito.when; /** * Test for {@link GridIoManager}. */ +@RunWith(JUnit4.class) public class GridIoManagerSelfTest extends GridCommonAbstractTest { /** Grid test context. */ private GridTestKernalContext ctx; @@ -87,6 +91,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSendIfOneOfNodesIsLocalAndTopicIsEnum() throws Exception { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -101,6 +106,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSendUserMessageThinVersionIfOneOfNodesIsLocal() throws Exception { Object msg = new Object(); @@ -125,6 +131,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSendUserMessageUnorderedThickVersionIfOneOfNodesIsLocal() throws Exception { Object msg = new Object(); @@ -149,6 +156,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSendUserMessageOrderedThickVersionIfOneOfNodesIsLocal() throws Exception { Object msg = new Object(); @@ -243,4 +251,4 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest { return 0; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java index 666bc1d..00e8964 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java @@ -41,10 +41,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 IgniteCommunicationBalanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -109,6 +113,7 @@ public class IgniteCommunicationBalanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBalance1() throws Exception { if (sslEnabled()) return; @@ -210,6 +215,7 @@ public class IgniteCommunicationBalanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBalance2() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_IO_BALANCE_PERIOD, "1000"); @@ -317,6 +323,7 @@ public class IgniteCommunicationBalanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandomBalance() throws Exception { System.setProperty(GridNioServer.IGNITE_IO_BALANCE_RANDOM_BALANCE, "true"); System.setProperty(IgniteSystemProperties.IGNITE_IO_BALANCE_PERIOD, "500"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java index 65231e7..931f9f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java @@ -28,10 +28,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 IgniteIoTestMessagesTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -66,6 +70,7 @@ public class IgniteIoTestMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIoTestMessages() throws Exception { for (Ignite node : G.allGrids()) { IgniteKernal ignite = (IgniteKernal)node; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java index 2ea1f90..1141736 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -40,6 +43,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class IgniteVariousConnectionNumberTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class IgniteVariousConnectionNumberTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVariousConnectionNumber() throws Exception { startGridsMultiThreaded(3); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java index f1f080b..833c56c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.testframework.ListeningTestLogger; import org.apache.ignite.testframework.LogListener; import org.apache.ignite.testframework.config.GridTestProperties; 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.GridTopic.TOPIC_CLASSLOAD; /** * Tests the processing of deployment request with an attempt to load a class with an unknown class name. */ +@RunWith(JUnit4.class) public class DeploymentRequestOfUnknownClassProcessingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -91,6 +95,7 @@ public class DeploymentRequestOfUnknownClassProcessingTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testResponseReceivingOnDeploymentRequestOfUnknownClass() throws Exception { IgniteEx locNode = grid(0); IgniteEx remNode = grid(1); @@ -148,4 +153,4 @@ public class DeploymentRequestOfUnknownClassProcessingTest extends GridCommonAbs // Checks that error has been logged on remote node. assertTrue(remNodeLogLsnr.check()); } -} \ 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/managers/deployment/GridDeploymentManagerStopSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java index 1d1a20a..71aabb1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java @@ -30,15 +30,20 @@ import org.apache.ignite.spi.deployment.DeploymentSpi; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid deployment manager stop test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridDeploymentManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOnKernalStop() throws Exception { DeploymentSpi spi = new GridTestDeploymentSpi(); @@ -106,4 +111,4 @@ public class GridDeploymentManagerStopSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public void onClientReconnected(boolean clusterRestarted) { /* No-op. */ } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java index e6905d8..d59d041 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.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; /** * Tests message count for different deployment scenarios. */ +@RunWith(JUnit4.class) public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -85,6 +89,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ + @Test public void testTaskDeployment() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -124,6 +129,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheValueDeploymentOnPut() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-4551"); @@ -211,4 +217,4 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest { return dep; } } -} \ No newline at end of file +}