http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java index 9eeff33..1eadea1 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +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; @@ -49,6 +52,7 @@ import static org.apache.ignite.internal.processors.hadoop.impl.fs.HadoopParamet /** * Ensures that sampling is really turned on/off. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstractTest { /** IGFS. */ private IgfsEx igfs; @@ -142,6 +146,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testLoggingDisabledSamplingNotSet() throws Exception { startUp(); @@ -153,6 +158,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testLoggingEnabledSamplingNotSet() throws Exception { logging = true; @@ -166,6 +172,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testLoggingDisabledSamplingDisabled() throws Exception { sampling = false; @@ -179,6 +186,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testLoggingEnabledSamplingDisabled() throws Exception { logging = true; sampling = false; @@ -193,6 +201,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testLoggingDisabledSamplingEnabled() throws Exception { sampling = true; @@ -206,6 +215,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testLoggingEnabledSamplingEnabled() throws Exception { logging = true; sampling = true; @@ -220,6 +230,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * * @throws Exception If failed. */ + @Test public void testSamplingChange() throws Exception { // Start with sampling not set. startUp(); @@ -286,6 +297,7 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testLogDirectory() throws Exception { startUp(); @@ -329,4 +341,4 @@ public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstrac return ((IgfsLogger)field.get(fs)).isLogEnabled(); } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java index 1c75cfb..6850e72 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.internal.util.ipc.IpcEndpoint; import org.apache.ignite.internal.util.ipc.IpcEndpointFactory; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT; /** * IGFS Hadoop file system IPC self test. */ +@RunWith(JUnit4.class) public abstract class IgniteHadoopFileSystemShmemAbstractSelfTest extends IgniteHadoopFileSystemAbstractSelfTest { /** * Constructor. @@ -61,6 +65,7 @@ public abstract class IgniteHadoopFileSystemShmemAbstractSelfTest extends Ignite * * @throws Exception If error occurred. */ + @Test public void testOutOfResources() throws Exception { final Collection<IpcEndpoint> eps = new LinkedList<>(); @@ -90,4 +95,4 @@ public abstract class IgniteHadoopFileSystemShmemAbstractSelfTest extends Ignite ep.close(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java index bef23c0..24bab6b 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.internal.util.ipc.IpcEndpoint; import org.apache.ignite.internal.util.ipc.IpcEndpointFactory; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT; /** * IGFS Hadoop file system IPC self test. */ +@RunWith(JUnit4.class) public abstract class IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest extends IgniteHadoopFileSystemAbstractSelfTest { /** @@ -73,6 +77,7 @@ public abstract class IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTes * * @throws Exception If error occurred. */ + @Test public void testOutOfResources() throws Exception { final Collection<IpcEndpoint> eps = new LinkedList<>(); @@ -102,4 +107,4 @@ public abstract class IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTes ep.close(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java index 7862d6e..82cf90e 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java @@ -43,12 +43,17 @@ import org.apache.ignite.internal.util.io.GridDataInput; import org.apache.ignite.internal.util.io.GridUnsafeDataInput; import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory; 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 HadoopConcurrentHashMultimapSelftest extends HadoopAbstractMapTest { /** */ + @Test public void testMapSimple() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -185,6 +190,7 @@ public class HadoopConcurrentHashMultimapSelftest extends HadoopAbstractMapTest /** * @throws Exception if failed. */ + @Test public void testMultiThreaded() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -277,4 +283,4 @@ public class HadoopConcurrentHashMultimapSelftest extends HadoopAbstractMapTest assertEquals(0, mem.allocatedSize()); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java index 195bcbb..9adb496 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java @@ -33,16 +33,21 @@ import java.util.Collection; import java.util.Iterator; import java.util.Map; import java.util.Random; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class HadoopHashMapSelfTest extends HadoopAbstractMapTest { /** * Test simple map. * * @throws Exception If failed. */ + @Test public void testMapSimple() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -130,4 +135,4 @@ public class HadoopHashMapSelfTest extends HadoopAbstractMapTest { return lst.sort(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java index 21575c5..720a187 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java @@ -43,14 +43,19 @@ import org.apache.ignite.internal.util.io.GridDataInput; import org.apache.ignite.internal.util.io.GridUnsafeDataInput; import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Skip list tests. */ +@RunWith(JUnit4.class) public class HadoopSkipListSelfTest extends HadoopAbstractMapTest { /** * @throws Exception On error. */ + @Test public void testMapSimple() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -200,6 +205,7 @@ public class HadoopSkipListSelfTest extends HadoopAbstractMapTest { /** * @throws Exception if failed. */ + @Test public void testMultiThreaded() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -292,4 +298,4 @@ public class HadoopSkipListSelfTest extends HadoopAbstractMapTest { assertEquals(0, mem.allocatedSize()); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java index c7d4dce..eb011ef 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java @@ -34,16 +34,21 @@ import org.apache.ignite.internal.processors.hadoop.shuffle.streams.HadoopDataOu import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory; 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; /** * */ +@RunWith(JUnit4.class) public class HadoopDataStreamSelfTest extends GridCommonAbstractTest { private static final int BUFF_SIZE = 4 * 1024; /** * @throws IOException If failed. */ + @Test public void testStreams() throws IOException { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -65,6 +70,7 @@ public class HadoopDataStreamSelfTest extends GridCommonAbstractTest { /** * @throws IOException If failed. */ + @Test public void testDirectStreams() throws IOException { HadoopDirectDataOutput out = new HadoopDirectDataOutput(BUFF_SIZE); @@ -80,6 +86,7 @@ public class HadoopDataStreamSelfTest extends GridCommonAbstractTest { /** * @throws IOException If failed. */ + @Test public void testReadline() throws IOException { checkReadLine("String1\rString2\r\nString3\nString4"); checkReadLine("String1\rString2\r\nString3\nString4\r\n"); @@ -295,4 +302,4 @@ public class HadoopDataStreamSelfTest extends GridCommonAbstractTest { assertEquals("mom washes rum", in.readUTF()); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java index cc6cbb3..c1b7b99 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java @@ -23,14 +23,19 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.Callable; import java.util.concurrent.atomic.LongAdder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class HadoopExecutorServiceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExecutesAll() throws Exception { final HadoopExecutorService exec = new HadoopExecutorService(log, "_GRID_NAME_", 10, 5); @@ -69,4 +74,4 @@ public class HadoopExecutorServiceTest extends GridCommonAbstractTest { assertTrue(exec.shutdown(0)); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java index 1246078..84fb7fc 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.internal.processors.hadoop.impl.HadoopAbstractSelfTest; import org.apache.ignite.internal.processors.hadoop.HadoopJobId; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.marshaller.jdk.JdkMarshaller; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; /** * Job tracker self test. */ +@RunWith(JUnit4.class) public class HadoopExternalTaskExecutionSelfTest extends HadoopAbstractSelfTest { /** {@inheritDoc} */ @Override protected boolean igfsEnabled() { @@ -89,6 +93,7 @@ public class HadoopExternalTaskExecutionSelfTest extends HadoopAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testSimpleTaskSubmit() throws Exception { String testInputFile = "/test"; @@ -125,6 +130,7 @@ public class HadoopExternalTaskExecutionSelfTest extends HadoopAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testMapperException() throws Exception { String testInputFile = "/test"; @@ -231,4 +237,4 @@ public class HadoopExternalTaskExecutionSelfTest extends HadoopAbstractSelfTest ctx.write(line, new IntWritable(s)); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/communication/HadoopExternalCommunicationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/communication/HadoopExternalCommunicationSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/communication/HadoopExternalCommunicationSelfTest.java index 38ff318..d663fa1 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/communication/HadoopExternalCommunicationSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/communication/HadoopExternalCommunicationSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.marshaller.Marshaller; 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; /** * Tests Hadoop external communication component. */ +@RunWith(JUnit4.class) public class HadoopExternalCommunicationSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -49,6 +53,7 @@ public class HadoopExternalCommunicationSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testSimpleMessageSendingTcp() throws Exception { checkSimpleMessageSending(false); } @@ -56,6 +61,7 @@ public class HadoopExternalCommunicationSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testSimpleMessageSendingShmem() throws Exception { checkSimpleMessageSending(true); } @@ -219,4 +225,4 @@ public class HadoopExternalCommunicationSelfTest extends GridCommonAbstractTest to = in.readInt(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/BasicUserNameMapperSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/BasicUserNameMapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/BasicUserNameMapperSelfTest.java index 43924ed..c5dda12 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/BasicUserNameMapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/BasicUserNameMapperSelfTest.java @@ -23,16 +23,21 @@ import org.jetbrains.annotations.Nullable; import java.util.HashMap; import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for basic user name mapper. */ +@RunWith(JUnit4.class) public class BasicUserNameMapperSelfTest extends GridCommonAbstractTest { /** * Test null mappings. * * @throws Exception If failed. */ + @Test public void testNullMappings() throws Exception { checkNullOrEmptyMappings(null); } @@ -42,6 +47,7 @@ public class BasicUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testEmptyMappings() throws Exception { checkNullOrEmptyMappings(new HashMap<String, String>()); } @@ -83,6 +89,7 @@ public class BasicUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMappings() throws Exception { Map<String, String> map = new HashMap<>(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java index 0434ebb..a839654 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.Collections; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for chained user name mapper. */ +@RunWith(JUnit4.class) public class ChainedUserNameMapperSelfTest extends GridCommonAbstractTest { /** Test instance. */ private static final String INSTANCE = "test_instance"; @@ -44,6 +48,7 @@ public class ChainedUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNullMappers() throws Exception { GridTestUtils.assertThrows(null, new Callable<Void>() { @Override public Void call() throws Exception { @@ -59,6 +64,7 @@ public class ChainedUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNullMapperElement() throws Exception { GridTestUtils.assertThrows(null, new Callable<Void>() { @Override public Void call() throws Exception { @@ -74,6 +80,7 @@ public class ChainedUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testChaining() throws Exception { BasicUserNameMapper mapper1 = new BasicUserNameMapper(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java index bd76b51..a32245e 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.hadoop.util.KerberosUserNameMapper; import org.apache.ignite.internal.processors.igfs.IgfsUtils; 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 for Kerberos name mapper. */ +@RunWith(JUnit4.class) public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { /** Test instance. */ private static final String INSTANCE = "test_instance"; @@ -37,6 +41,7 @@ public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMapper() throws Exception { KerberosUserNameMapper mapper = create(null, null); @@ -49,6 +54,7 @@ public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMapperInstance() throws Exception { KerberosUserNameMapper mapper = create(INSTANCE, null); @@ -61,6 +67,7 @@ public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMapperRealm() throws Exception { KerberosUserNameMapper mapper = create(null, REALM); @@ -73,6 +80,7 @@ public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMapperInstanceAndRealm() throws Exception { KerberosUserNameMapper mapper = create(INSTANCE, REALM); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java index 199fa96..9da757f 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; @@ -122,109 +123,109 @@ public class IgniteHadoopTestSuite extends TestSuite { TestSuite suite = new TestSuite("Ignite Hadoop MR Test Suite"); - suite.addTest(new TestSuite(ldr.loadClass(HadoopUserLibsSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopUserLibsSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopWeightedMapReducePlannerTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopWeightedMapReducePlannerTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(BasicUserNameMapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(KerberosUserNameMapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(ChainedUserNameMapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(BasicUserNameMapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(KerberosUserNameMapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(ChainedUserNameMapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(KerberosHadoopFileSystemFactorySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(KerberosHadoopFileSystemFactorySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTeraSortTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTeraSortTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSnappyTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSnappyFullMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSnappyTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSnappyFullMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfs20FileSystemLoopbackPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfs20FileSystemLoopbackPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfsDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfsDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfsDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfsDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsDualSyncTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsDualAsyncTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsProxyTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(Hadoop1OverIgfsDualSyncTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(Hadoop1OverIgfsDualAsyncTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(Hadoop1OverIgfsProxyTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopFIleSystemFactorySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopFIleSystemFactorySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalSecondarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedSecondarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedProxySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientProxySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalSecondarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedSecondarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedProxySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientProxySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoggerStateSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoggerSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoggerStateSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoggerSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemHandshakeSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemHandshakeSelfTest.class.getName()))); suite.addTest(IgfsEventsTestSuite.suiteNoarchOnly()); - suite.addTest(new TestSuite(ldr.loadClass(HadoopFileSystemsTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopFileSystemsTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopExecutorServiceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopExecutorServiceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopValidationSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopValidationSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopJobTrackerSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopJobTrackerSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopHashMapSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopDataStreamSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopConcurrentHashMultimapSelftest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopHashMapSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopDataStreamSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopConcurrentHashMultimapSelftest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSkipListSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSkipListSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTaskExecutionSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTaskExecutionSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopV2JobSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopV2JobSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSerializationWrapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSplitWrapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSerializationWrapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSplitWrapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTasksV1Test.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTasksV2Test.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTasksV1Test.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTasksV2Test.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopWeightedPlannerMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopNoHadoopMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopMapReduceErrorResilienceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopWeightedPlannerMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopNoHadoopMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopMapReduceErrorResilienceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopMapReduceEmbeddedSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopMapReduceEmbeddedSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSortingTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSortingTest.class.getName()))); // TODO https://issues.apache.org/jira/browse/IGNITE-3167 -// suite.addTest(new TestSuite(ldr.loadClass(HadoopExternalTaskExecutionSelfTest.class.getName()))); -// suite.addTest(new TestSuite(ldr.loadClass(HadoopExternalCommunicationSelfTest.class.getName()))); -// suite.addTest(new TestSuite(ldr.loadClass(HadoopSortingExternalTest.class.getName()))); +// suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopExternalTaskExecutionSelfTest.class.getName()))); +// suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopExternalCommunicationSelfTest.class.getName()))); +// suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSortingExternalTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopGroupingTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopGroupingTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopClientProtocolSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopClientProtocolEmbeddedSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopClientProtocolMultipleServersSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopClientProtocolSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopClientProtocolEmbeddedSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopClientProtocolMultipleServersSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopCommandLineTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopCommandLineTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSecondaryFileSystemConfigurationTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSecondaryFileSystemConfigurationTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTxConfigCacheTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTxConfigCacheTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedOpenTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedOpenTest.class.getName()))); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java index 7d1b55d..c5c7646 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.hadoop.HadoopTestClassLoader; import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfs20FileSystemShmemPrimarySelfTest; @@ -51,22 +52,22 @@ public class IgniteIgfsLinuxAndMacOSTestSuite extends TestSuite { TestSuite suite = new TestSuite("Ignite IGFS Test Suite For Linux And Mac OS"); - suite.addTest(new TestSuite(ldr.loadClass(IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalSecondarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientProxySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalSecondarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientProxySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemIpcCacheSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemIpcCacheSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfs20FileSystemShmemPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfs20FileSystemShmemPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgfsNearOnlyMultiNodeSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgfsNearOnlyMultiNodeSelfTest.class.getName()))); suite.addTest(IgfsEventsTestSuite.suite()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java index a28c5da..eb09c59 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java @@ -40,6 +40,9 @@ import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistryBuilder; +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; @@ -57,6 +60,7 @@ import static org.hibernate.cfg.AvailableSettings.USE_SECOND_LEVEL_CACHE; /** * Tests Hibernate L2 cache configuration. */ +@RunWith(JUnit4.class) public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTest { /** */ public static final String ENTITY1_NAME = Entity1.class.getName(); @@ -168,6 +172,7 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes /** * Tests property {@link HibernateAccessStrategyFactory#REGION_CACHE_PROPERTY}. */ + @Test public void testPerRegionCacheProperty() { testCacheUsage(1, 1, 0, 1, 1); } @@ -175,6 +180,7 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes /** * Tests property {@link HibernateAccessStrategyFactory#DFLT_CACHE_NAME_PROPERTY}. */ + @Test public void testDefaultCache() { dfltCache = true; @@ -401,4 +407,4 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes this.id = id; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java index ed092aa..43c54b2 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java @@ -36,6 +36,9 @@ import org.hibernate.Transaction; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistryBuilder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.cache.hibernate.HibernateAccessStrategyFactory.DFLT_CACHE_NAME_PROPERTY; @@ -46,6 +49,7 @@ import static org.hibernate.cache.spi.access.AccessType.NONSTRICT_READ_WRITE; /** * */ +@RunWith(JUnit4.class) public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "hibernateCache"; @@ -89,6 +93,7 @@ public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testL2Cache() throws Exception { Ignite srv = ignite(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java index d69c61a..04fa9c2 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java @@ -55,6 +55,9 @@ import org.hibernate.exception.ConstraintViolationException; import org.hibernate.service.ServiceRegistryBuilder; import org.hibernate.stat.NaturalIdCacheStatistics; import org.hibernate.stat.SecondLevelCacheStatistics; +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; @@ -74,6 +77,7 @@ import static org.hibernate.cfg.Environment.USE_SECOND_LEVEL_CACHE; * * Tests Hibernate L2 cache. */ +@RunWith(JUnit4.class) public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -535,6 +539,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCollectionCache() throws Exception { for (AccessType accessType : accessTypes()) testCollectionCache(accessType); @@ -655,6 +660,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntityCache() throws Exception { for (AccessType accessType : accessTypes()) testEntityCache(accessType); @@ -815,6 +821,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTwoEntitiesSameCache() throws Exception { for (AccessType accessType : accessTypes()) testTwoEntitiesSameCache(accessType); @@ -1018,6 +1025,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionedEntity() throws Exception { for (AccessType accessType : accessTypes()) testVersionedEntity(accessType); @@ -1128,6 +1136,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNaturalIdCache() throws Exception { for (AccessType accessType : accessTypes()) testNaturalIdCache(accessType); @@ -1282,6 +1291,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntityCacheTransactionFails() throws Exception { for (AccessType accessType : accessTypes()) testEntityCacheTransactionFails(accessType); @@ -1456,6 +1466,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQueryCache() throws Exception { for (AccessType accessType : accessTypes()) testQueryCache(accessType); @@ -1620,6 +1631,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRegionClear() throws Exception { for (AccessType accessType : accessTypes()) testRegionClear(accessType); @@ -1945,4 +1957,4 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { return map; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java index 5e1fd32..44d7701 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java @@ -36,6 +36,9 @@ import org.hibernate.Transaction; import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistryBuilder; +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; @@ -55,6 +58,7 @@ import static org.junit.Assert.assertThat; * Tests Hibernate L2 cache configuration. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { /** */ private static final String ENTITY1_NAME = Entity1.class.getName(); @@ -168,6 +172,7 @@ public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntityCacheReadWrite() throws Exception { for (AccessType accessType : new AccessType[]{AccessType.READ_WRITE, AccessType.NONSTRICT_READ_WRITE}) testEntityCacheReadWrite(accessType); @@ -589,4 +594,4 @@ public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { for (IgniteCacheProxy<?, ?> cache : ((IgniteKernal)grid(0)).caches()) cache.clear(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java index 0dab22c..a0663f3 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java @@ -43,10 +43,14 @@ import org.hibernate.engine.spi.FilterDefinition; import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.CollectionMetadata; import org.hibernate.stat.Statistics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Cache jdbc blob store factory. */ +@RunWith(JUnit4.class) public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "test"; @@ -57,6 +61,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheConfiguration() throws Exception { try (Ignite ignite1 = startGrid(0)) { IgniteCache<Integer, String> cache1 = ignite1.getOrCreateCache(cacheConfiguration()); @@ -68,6 +73,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testXmlConfiguration() throws Exception { try (Ignite ignite = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache.xml")) { try(Ignite ignite1 = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache1.xml")) { @@ -82,6 +88,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIncorrectBeanConfiguration() throws Exception { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -285,4 +292,4 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { return null; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java index 8d45dea..2cea470 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.hibernate.HibernateL2CacheConfigurationSelfTest; import org.apache.ignite.cache.hibernate.HibernateL2CacheMultiJvmTest; @@ -35,26 +36,25 @@ import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListene public class IgniteHibernateTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Hibernate Integration Test Suite"); // Hibernate L2 cache. - suite.addTestSuite(HibernateL2CacheSelfTest.class); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheSelfTest.class)); suite.addTestSuite(HibernateL2CacheTransactionalSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalUseSyncSelfTest.class); - suite.addTestSuite(HibernateL2CacheConfigurationSelfTest.class); - suite.addTestSuite(HibernateL2CacheStrategySelfTest.class); - suite.addTestSuite(HibernateL2CacheMultiJvmTest.class); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalUseSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheStrategySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheMultiJvmTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreSelfTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreNodeRestartTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreNodeRestartTest.class)); - suite.addTestSuite(CacheHibernateStoreSessionListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreSessionListenerSelfTest.class)); - suite.addTestSuite(CacheHibernateStoreFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreFactorySelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java index 2268b06..f828d04 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java @@ -40,6 +40,9 @@ import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cfg.Configuration; +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; @@ -55,6 +58,7 @@ import static org.hibernate.cfg.AvailableSettings.USE_SECOND_LEVEL_CACHE; /** * Tests Hibernate L2 cache configuration. */ +@RunWith(JUnit4.class) public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTest { /** */ public static final String ENTITY1_NAME = Entity1.class.getName(); @@ -165,6 +169,7 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes /** * Tests property {@link HibernateAccessStrategyFactory#REGION_CACHE_PROPERTY}. */ + @Test public void testPerRegionCacheProperty() { testCacheUsage(1, 1, 0, 1, 1); } @@ -172,6 +177,7 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes /** * Tests property {@link HibernateAccessStrategyFactory#DFLT_CACHE_NAME_PROPERTY}. */ + @Test public void testDefaultCache() { dfltCache = true; @@ -399,4 +405,4 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes this.id = id; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java index 268ea8c..b3da8bb 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java @@ -36,6 +36,9 @@ import org.hibernate.Transaction; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.cache.hibernate.HibernateAccessStrategyFactory.DFLT_CACHE_NAME_PROPERTY; @@ -46,6 +49,7 @@ import static org.hibernate.cache.spi.access.AccessType.NONSTRICT_READ_WRITE; /** * */ +@RunWith(JUnit4.class) public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "hibernateCache"; @@ -89,6 +93,7 @@ public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testL2Cache() throws Exception { Ignite srv = ignite(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java index 2e0d206..0c351cd 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java @@ -59,6 +59,9 @@ import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.RootClass; import org.hibernate.stat.NaturalIdCacheStatistics; import org.hibernate.stat.SecondLevelCacheStatistics; +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; @@ -78,6 +81,7 @@ import static org.hibernate.cfg.Environment.USE_SECOND_LEVEL_CACHE; * * Tests Hibernate L2 cache. */ +@RunWith(JUnit4.class) public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -513,6 +517,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCollectionCache() throws Exception { for (AccessType accessType : accessTypes()) testCollectionCache(accessType); @@ -633,6 +638,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntityCache() throws Exception { for (AccessType accessType : accessTypes()) testEntityCache(accessType); @@ -793,6 +799,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTwoEntitiesSameCache() throws Exception { for (AccessType accessType : accessTypes()) testTwoEntitiesSameCache(accessType); @@ -996,6 +1003,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionedEntity() throws Exception { for (AccessType accessType : accessTypes()) testVersionedEntity(accessType); @@ -1106,6 +1114,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNaturalIdCache() throws Exception { for (AccessType accessType : accessTypes()) testNaturalIdCache(accessType); @@ -1260,6 +1269,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntityCacheTransactionFails() throws Exception { for (AccessType accessType : accessTypes()) testEntityCacheTransactionFails(accessType); @@ -1434,6 +1444,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQueryCache() throws Exception { for (AccessType accessType : accessTypes()) testQueryCache(accessType); @@ -1598,6 +1609,7 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRegionClear() throws Exception { for (AccessType accessType : accessTypes()) testRegionClear(accessType); @@ -1949,4 +1961,4 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { return map; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java index 8bd80da..0efb815 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java @@ -40,6 +40,9 @@ import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cache.spi.access.AccessType; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.RootClass; +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; @@ -51,6 +54,7 @@ import static org.junit.Assert.assertThat; * Tests Hibernate L2 cache configuration. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { /** */ private static final String ENTITY1_NAME = Entity1.class.getName(); @@ -120,6 +124,7 @@ public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntityCacheReadWrite() throws Exception { for (AccessType accessType : new AccessType[]{AccessType.READ_WRITE, AccessType.NONSTRICT_READ_WRITE}) testEntityCacheReadWrite(accessType); @@ -561,4 +566,4 @@ public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { for (IgniteCacheProxy<?, ?> cache : ((IgniteKernal)grid(0)).caches()) cache.clear(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java index c62db4a..9deaeec 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java @@ -25,10 +25,14 @@ import org.hibernate.FlushMode; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.resource.transaction.spi.TransactionStatus; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cache store test. */ +@RunWith(JUnit4.class) public class CacheHibernateBlobStoreSelfTest extends GridAbstractCacheStoreSelfTest<CacheHibernateBlobStore<Object, Object>> { /** @@ -69,6 +73,7 @@ public class CacheHibernateBlobStoreSelfTest extends /** * @throws Exception If failed. */ + @Test public void testConfigurationByUrl() throws Exception { URL url = U.resolveIgniteUrl(CacheHibernateStoreFactorySelfTest.MODULE_PATH + "/src/test/java/org/apache/ignite/cache/store/hibernate/hibernate.cfg.xml"); @@ -84,6 +89,7 @@ public class CacheHibernateBlobStoreSelfTest extends /** * @throws Exception If failed. */ + @Test public void testConfigurationByFile() throws Exception { URL url = U.resolveIgniteUrl(CacheHibernateStoreFactorySelfTest.MODULE_PATH + "/src/test/java/org/apache/ignite/cache/store/hibernate/hibernate.cfg.xml"); @@ -101,6 +107,7 @@ public class CacheHibernateBlobStoreSelfTest extends /** * @throws Exception If failed. */ + @Test public void testConfigurationByResource() throws Exception { store.setHibernateConfigurationPath("/org/apache/ignite/cache/store/hibernate/hibernate.cfg.xml"); @@ -108,6 +115,7 @@ public class CacheHibernateBlobStoreSelfTest extends store.load("key"); } + @Test @Override public void testSimpleMultithreading() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1757"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java index a329f2b..8519923 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java @@ -43,10 +43,14 @@ import org.hibernate.engine.spi.FilterDefinition; import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.CollectionMetadata; import org.hibernate.stat.Statistics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Cache jdbc blob store factory. */ +@RunWith(JUnit4.class) public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "test"; @@ -57,6 +61,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheConfiguration() throws Exception { try (Ignite ignite1 = startGrid(0)) { IgniteCache<Integer, String> cache1 = ignite1.getOrCreateCache(cacheConfiguration()); @@ -68,6 +73,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testXmlConfiguration() throws Exception { try (Ignite ignite = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache.xml")) { try(Ignite ignite1 = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache1.xml")) { @@ -82,6 +88,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIncorrectBeanConfiguration() throws Exception { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -253,4 +260,4 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { return null; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java ---------------------------------------------------------------------- diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java index b571599..f64a0c4 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.hibernate.HibernateL2CacheConfigurationSelfTest; import org.apache.ignite.cache.hibernate.HibernateL2CacheMultiJvmTest; @@ -35,26 +36,25 @@ import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListene public class IgniteHibernate5TestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Hibernate5 Integration Test Suite"); // Hibernate L2 cache. - suite.addTestSuite(HibernateL2CacheSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalUseSyncSelfTest.class); - suite.addTestSuite(HibernateL2CacheConfigurationSelfTest.class); - suite.addTestSuite(HibernateL2CacheStrategySelfTest.class); - suite.addTestSuite(HibernateL2CacheMultiJvmTest.class); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalUseSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheStrategySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheMultiJvmTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreSelfTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreNodeRestartTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreNodeRestartTest.class)); - suite.addTestSuite(CacheHibernateStoreSessionListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreSessionListenerSelfTest.class)); - suite.addTestSuite(CacheHibernateStoreFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreFactorySelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java index 67db94c..ff147e7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; 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; /** * IGNITE-7793 SQL does not work if value has sql field which name equals to affinity keyProducer name */ +@RunWith(JUnit4.class) public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbstractTest { /** */ private static final String PERSON_CACHE = "person"; @@ -92,6 +96,7 @@ public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testQueryEntityConfig() throws Exception { qryEntityCfg = true; keyCls = PersonKey1.class; @@ -102,6 +107,7 @@ public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testQueryEntityConfigKeySpecified() throws Exception { qryEntityCfg = true; keyFieldSpecified = true; @@ -113,6 +119,7 @@ public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testAnnotationConfig() throws Exception { keyCls = PersonKey1.class; keyProducer = PersonKey1::new; @@ -122,6 +129,7 @@ public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testAnnotationConfigCollision() throws Exception { keyCls = PersonKey2.class; keyProducer = PersonKey2::new; @@ -258,4 +266,4 @@ public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbst return S.toString(Person.class, this); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java index 3b5562a..4e443f9b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.events.EventType; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This is a specific test for IGNITE-8900. */ +@RunWith(JUnit4.class) public class BigEntryQueryTest extends GridCommonAbstractTest { /** */ public static final String CACHE = "cache"; @@ -55,6 +59,7 @@ public class BigEntryQueryTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testBigEntriesSelect() throws Exception { startGrids(2);
