IGNITE-10796 Migrate from JUnit 3 to 4 suites involving IgniteTestSuite
authorOleg Ignatenko <oignatenko@gridgain.com>
Fri, 11 Jan 2019 14:47:40 +0000 (17:47 +0300)
committerDmitriy Pavlov <dpavlov@apache.org>
Fri, 11 Jan 2019 14:49:51 +0000 (17:49 +0300)
- cleanup per self-review // found unused method
-- verified with diffs overview and rebuild - Fixes #5738.

Signed-off-by: Dmitriy Pavlov <dpavlov@apache.org>
90 files changed:
modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java
modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java
modules/compress/src/test/java/org/apache/ignite/testsuites/IgnitePdsCompressionTestSuite.java
modules/compress/src/test/java/org/apache/ignite/testsuites/IgnitePdsCompressionTestSuite2.java
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsCacheTestSuite3.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsComputeGridTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite1.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite5.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite8.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheNearOnlySelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheWriteBehindTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite2.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite3.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite4.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java
modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java
modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java
modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java
modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java
modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java
modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java
modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiAbstractTestSuite.java
modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java

index 399d759..f8a9acc 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.gridify.BasicAopSelfTest;
 import org.apache.ignite.gridify.GridifySetToXXXNonSpringAopSelfTest;
 import org.apache.ignite.gridify.GridifySetToXXXSpringAopSelfTest;
 import org.apache.ignite.gridify.NonSpringAopSelfTest;
 import org.apache.ignite.gridify.SpringAopSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 import org.test.gridify.ExternalNonSpringAopSelfTest;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP;
@@ -34,26 +33,22 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP
 /**
  * AOP test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    // Test configuration.
+    BasicAopSelfTest.class,
+
+    SpringAopSelfTest.class,
+    NonSpringAopSelfTest.class,
+    GridifySetToXXXSpringAopSelfTest.class,
+    GridifySetToXXXNonSpringAopSelfTest.class,
+    ExternalNonSpringAopSelfTest.class,
+})
 public class IgniteAopSelfTestSuite {
-    /**
-     * @return AOP test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite AOP Test Suite");
-
-        // Test configuration.
-        suite.addTest(new JUnit4TestAdapter(BasicAopSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(SpringAopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(NonSpringAopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridifySetToXXXSpringAopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridifySetToXXXNonSpringAopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(ExternalNonSpringAopSelfTest.class));
-
+    /** */
+    @BeforeClass
+    public static void init() {
         // Examples
         System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteAopSelfTestSuite.class));
-
-        return suite;
     }
 }
index 8e9f0b1..7028a5c 100644 (file)
 
 package org.apache.ignite.stream.camel;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Camel streamer tests. Included into 'Streamers' run configuration.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({IgniteCamelStreamerTest.class})
 public class IgniteCamelStreamerTestSuite {
-    /**
-     * @return {@link IgniteCamelStreamerTest} test suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests List of ignored tests.
-     * @return Test suite.
-     */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCamelStreamer Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(IgniteCamelStreamerTest.class));
-
-        return suite;
-    }
 }
index 696c614..3cc08b6 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.ignite.internal.processors.compress.CompressionConfigurationTest;
 import org.apache.ignite.internal.processors.compress.CompressionProcessorTest;
 import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationAsyncTest;
 import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationTest;
 import org.apache.ignite.internal.processors.compress.FileSystemUtilsTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_DEFAULT_DATA_STORAGE_PAGE_SIZE;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_DEFAULT_DISK_PAGE_COMPRESSION;
@@ -31,18 +34,19 @@ import static org.apache.ignite.configuration.DiskPageCompression.ZSTD;
 
 /**
  */
+@RunWith(IgnitePdsCompressionTestSuite.DynamicSuite.class)
 public class IgnitePdsCompressionTestSuite {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite (with page compression).");
+    public static List<Class<?>> suite() {
+        List<Class<?>> suite = new ArrayList<>();
 
-        suite.addTest(new JUnit4TestAdapter(CompressionConfigurationTest.class));
-        suite.addTest(new JUnit4TestAdapter(CompressionProcessorTest.class));
-        suite.addTest(new JUnit4TestAdapter(FileSystemUtilsTest.class));
-        suite.addTest(new JUnit4TestAdapter(DiskPageCompressionIntegrationTest.class));
-        suite.addTest(new JUnit4TestAdapter(DiskPageCompressionIntegrationAsyncTest.class));
+        suite.add(CompressionConfigurationTest.class);
+        suite.add(CompressionProcessorTest.class);
+        suite.add(FileSystemUtilsTest.class);
+        suite.add(DiskPageCompressionIntegrationTest.class);
+        suite.add(DiskPageCompressionIntegrationAsyncTest.class);
 
         enableCompressionByDefault();
         IgnitePdsTestSuite.addRealPageStoreTests(suite, null);
@@ -56,4 +60,12 @@ public class IgnitePdsCompressionTestSuite {
         System.setProperty(IGNITE_DEFAULT_DISK_PAGE_COMPRESSION, ZSTD.name());
         System.setProperty(IGNITE_DEFAULT_DATA_STORAGE_PAGE_SIZE, String.valueOf(8 * 1024));
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 4151adf..81e3adf 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.List;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 import static org.apache.ignite.testsuites.IgnitePdsCompressionTestSuite.enableCompressionByDefault;
 
 /**
  */
+@RunWith(IgnitePdsCompressionTestSuite2.DynamicSuite.class)
 public class IgnitePdsCompressionTestSuite2 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite 2 (with page compression).");
+    public static List<Class<?>> suite() {
+        List<Class<?>> suite = new ArrayList<>();
 
         enableCompressionByDefault();
         IgnitePdsTestSuite2.addRealPageStoreTests(suite, null);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 5afe406..57d601a 100644 (file)
 
 package org.apache.ignite.internal.processors.cache;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Cache interceptor suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheInterceptorSelfTestSuite.DynamicSuite.class)
 public class IgniteCacheInterceptorSelfTestSuite {
     /**
      * @return Cache API test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("CacheInterceptor Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorLocalSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorLocalWithStoreSelfTest.class, ignoredTests);
@@ -75,4 +77,12 @@ public class IgniteCacheInterceptorSelfTestSuite {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index e922537..681cca5 100644 (file)
 
 package org.apache.ignite.internal.processors.cache.expiry;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.cache.store.IgniteCacheExpiryStoreLoadSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerNotificationTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerExpiredEventsTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheExpireAndUpdateConsistencyTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  *
  */
-@RunWith(AllTests.class)
-public class IgniteCacheExpiryPolicyTestSuite {
-    /**
-     * @return Cache Expiry Policy test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Cache Expiry Policy Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheLargeValueExpireTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteCacheLargeValueExpireTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalExpiryPolicyTest.class));
-        //suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalOnheapExpiryPolicyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicExpiryPolicyTest.class));
-        //suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicOnheapExpiryPolicyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicWithStoreExpiryPolicyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicReplicatedExpiryPolicyTest.class));
+    IgniteCacheAtomicLocalExpiryPolicyTest.class,
+    //IgniteCacheAtomicLocalOnheapExpiryPolicyTest.class,
+    IgniteCacheAtomicExpiryPolicyTest.class,
+    //IgniteCacheAtomicOnheapExpiryPolicyTest.class,
+    IgniteCacheAtomicWithStoreExpiryPolicyTest.class,
+    IgniteCacheAtomicReplicatedExpiryPolicyTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxLocalExpiryPolicyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxExpiryPolicyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxWithStoreExpiryPolicyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxReplicatedExpiryPolicyTest.class));
+    IgniteCacheTxLocalExpiryPolicyTest.class,
+    IgniteCacheTxExpiryPolicyTest.class,
+    IgniteCacheTxWithStoreExpiryPolicyTest.class,
+    IgniteCacheTxReplicatedExpiryPolicyTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicExpiryPolicyWithStoreTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxExpiryPolicyWithStoreTest.class));
+    IgniteCacheAtomicExpiryPolicyWithStoreTest.class,
+    IgniteCacheTxExpiryPolicyWithStoreTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheExpiryStoreLoadSelfTest.class));
+    IgniteCacheExpiryStoreLoadSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheClientNearCacheExpiryTest.class));
+    IgniteCacheClientNearCacheExpiryTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerExpiredEventsTest.class));
+    IgniteCacheEntryListenerExpiredEventsTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheExpireAndUpdateConsistencyTest.class));
+    IgniteCacheExpireAndUpdateConsistencyTest.class,
 
-        // Eager ttl expiration tests.
-        suite.addTest(new JUnit4TestAdapter(GridCacheTtlManagerNotificationTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheOnlyOneTtlCleanupThreadExistsTest.class));
-
-        return suite;
-    }
+    // Eager ttl expiration tests.
+    GridCacheTtlManagerNotificationTest.class,
+    IgniteCacheOnlyOneTtlCleanupThreadExistsTest.class
+})
+public class IgniteCacheExpiryPolicyTestSuite {
 }
index f666f1e..e1306f5 100644 (file)
@@ -1954,12 +1954,30 @@ public final class GridTestUtils {
     }
 
     /**
+     * Adds test class to the list only if it's not in {@code ignoredTests} set.
+     *
+     * @param suite List where to place the test class.
+     * @param test Test.
+     * @param ignoredTests Tests to ignore. If test contained in the collection it is not included in suite
+     */
+    public static void addTestIfNeeded(@NotNull final List<Class<?>> suite, @NotNull final Class<?> test,
+        @Nullable final Collection<Class> ignoredTests) {
+        if (ignoredTests != null && ignoredTests.contains(test))
+            return;
+
+        suite.add(test);
+    }
+
+    /**
      * Adds test to the suite only if it's not in {@code ignoredTests} set.
+     * TODO IGNITE-10777 remove this method.
      *
      * @param suite TestSuite where to place the test.
      * @param test Test.
      * @param ignoredTests Tests to ignore. If test contained in the collection it is not included in suite
+     * @deprecated Use {@link GridTestUtils#addTestIfNeeded(List, Class, Collection)} instead.
      */
+    @Deprecated
     public static void addTestIfNeeded(@NotNull final TestSuite suite, @NotNull final Class<?> test,
         @Nullable final Collection<Class> ignoredTests) {
         if (ignoredTests != null && ignoredTests.contains(test))
index 369a0b5..d6ab28d 100644 (file)
@@ -17,9 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.GridSuppressedExceptionSelfTest;
 import org.apache.ignite.failure.FailureHandlerTriggeredTest;
 import org.apache.ignite.failure.OomFailureHandlerTest;
@@ -86,142 +83,125 @@ import org.apache.ignite.messaging.IgniteMessagingWithClientTest;
 import org.apache.ignite.plugin.security.SecurityPermissionSetBuilderTest;
 import org.apache.ignite.spi.GridSpiLocalHostInjectionTest;
 import org.apache.ignite.startup.properties.NotStringSystemPropertyTest;
-import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.test.ConfigVariationsTestSuiteBuilderTest;
 import org.apache.ignite.testframework.test.ListeningTestLoggerTest;
 import org.apache.ignite.testframework.test.ParametersTest;
 import org.apache.ignite.testframework.test.VariationsIteratorTest;
 import org.apache.ignite.util.AttributeNodeFilterSelfTest;
-import org.jetbrains.annotations.Nullable;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Basic test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteMarshallerSelfTestSuite.class,
+    IgniteLangSelfTestSuite.class,
+    IgniteUtilSelfTestSuite.class,
+
+    IgniteKernalSelfTestSuite.class,
+    IgniteStartUpTestSuite.class,
+    IgniteExternalizableSelfTestSuite.class,
+    IgniteP2PSelfTestSuite.class,
+    IgniteCacheP2pUnmarshallingErrorTestSuite.class,
+    IgniteStreamSelfTestSuite.class,
+
+    IgnitePlatformsTestSuite.class,
+
+    GridSelfTest.class,
+    ClusterGroupHostsSelfTest.class,
+    IgniteMessagingWithClientTest.class,
+    IgniteMessagingSendAsyncTest.class,
+
+    ClusterGroupSelfTest.class,
+    GridMessagingSelfTest.class,
+    GridMessagingNoPeerClassLoadingSelfTest.class,
+
+    GridReleaseTypeSelfTest.class,
+    GridProductVersionSelfTest.class,
+    GridAffinityProcessorRendezvousSelfTest.class,
+    GridAffinityProcessorMemoryLeakTest.class,
+    GridClosureProcessorSelfTest.class,
+    GridClosureProcessorRemoteTest.class,
+    GridClosureSerializationTest.class,
+    GridStartStopSelfTest.class,
+    GridProjectionForCachesSelfTest.class,
+    GridProjectionForCachesOnDaemonNodeSelfTest.class,
+    GridSpiLocalHostInjectionTest.class,
+    GridLifecycleBeanSelfTest.class,
+    GridStopWithCancelSelfTest.class,
+    GridReduceSelfTest.class,
+    GridEventConsumeSelfTest.class,
+    GridSuppressedExceptionSelfTest.class,
+    GridLifecycleAwareSelfTest.class,
+    GridMessageListenSelfTest.class,
+    GridFailFastNodeFailureDetectionSelfTest.class,
+    IgniteSlowClientDetectionSelfTest.class,
+    IgniteDaemonNodeMarshallerCacheTest.class,
+    IgniteMarshallerCacheConcurrentReadWriteTest.class,
+    GridNodeMetricsLogSelfTest.class,
+    GridLocalIgniteSerializationTest.class,
+    GridMBeansTest.class,
+    TransactionsMXBeanImplTest.class,
+    SetTxTimeoutOnPartitionMapExchangeTest.class,
+
+    IgniteExceptionInNioWorkerSelfTest.class,
+    IgniteLocalNodeMapBeforeStartTest.class,
+    OdbcConfigurationValidationSelfTest.class,
+    OdbcEscapeSequenceSelfTest.class,
+
+    DynamicProxySerializationMultiJvmSelfTest.class,
+
+    // Tests against configuration variations framework.
+    ParametersTest.class,
+    VariationsIteratorTest.class,
+    ConfigVariationsTestSuiteBuilderTest.class,
+    NotStringSystemPropertyTest.class,
+
+    MarshallerContextLockingSelfTest.class,
+    MarshallerContextSelfTest.class,
+
+    SecurityPermissionSetBuilderTest.class,
+
+    AttributeNodeFilterSelfTest.class,
+
+    // Basic DB data structures.
+    BPlusTreeSelfTest.class,
+    BPlusTreeFakeReuseSelfTest.class,
+    BPlusTreeReuseSelfTest.class,
+    IndexStorageSelfTest.class,
+    CacheFreeListImplSelfTest.class,
+    DataRegionMetricsSelfTest.class,
+    SwapPathConstructionSelfTest.class,
+
+    IgniteMarshallerCacheFSRestoreTest.class,
+    IgniteMarshallerCacheClassNameConflictTest.class,
+    IgniteMarshallerCacheClientRequestsMappingOnMissTest.class,
+
+    IgniteDiagnosticMessagesTest.class,
+    IgniteDiagnosticMessagesMultipleConnectionsTest.class,
+
+    IgniteRejectConnectOnNodeStopTest.class,
+
+    GridCleanerTest.class,
+
+    ClassSetTest.class,
+
+    // Basic failure handlers.
+    FailureHandlerTriggeredTest.class,
+    StopNodeFailureHandlerTest.class,
+    StopNodeOrHaltFailureHandlerTest.class,
+    OomFailureHandlerTest.class,
+    TransactionIntegrityWithSystemWorkerDeathTest.class,
+
+    AtomicOperationsInTxTest.class,
+
+    CacheRebalanceConfigValidationTest.class,
+
+    ListeningTestLoggerTest.class,
+
+    CacheLocalGetSerializationTest.class,
+})
 public class IgniteBasicTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Tests don't include in the execution. Providing null means nothing to exclude.
-     * @return Test suite.
-     */
-    public static TestSuite suite(@Nullable final Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Basic Test Suite");
-
-        suite.addTest(IgniteMarshallerSelfTestSuite.suite(ignoredTests));
-        suite.addTest(IgniteLangSelfTestSuite.suite());
-        suite.addTest(IgniteUtilSelfTestSuite.suite(ignoredTests));
-
-        suite.addTest(IgniteKernalSelfTestSuite.suite(ignoredTests));
-        suite.addTest(IgniteStartUpTestSuite.suite());
-        suite.addTest(IgniteExternalizableSelfTestSuite.suite());
-        suite.addTest(IgniteP2PSelfTestSuite.suite(ignoredTests));
-        suite.addTest(IgniteCacheP2pUnmarshallingErrorTestSuite.suite(ignoredTests));
-        suite.addTest(IgniteStreamSelfTestSuite.suite());
-
-        suite.addTest(IgnitePlatformsTestSuite.suite());
-
-        suite.addTest(new JUnit4TestAdapter(GridSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(ClusterGroupHostsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteMessagingWithClientTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteMessagingSendAsyncTest.class));
-
-        GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests);
-
-        GridTestUtils.addTestIfNeeded(suite, GridReleaseTypeSelfTest.class, ignoredTests);
-        suite.addTest(new JUnit4TestAdapter(GridProductVersionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAffinityProcessorRendezvousSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAffinityProcessorMemoryLeakTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridClosureProcessorSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridClosureProcessorRemoteTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridClosureSerializationTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridProjectionForCachesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridProjectionForCachesOnDaemonNodeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSpiLocalHostInjectionTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLifecycleBeanSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridStopWithCancelSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridReduceSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEventConsumeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSuppressedExceptionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLifecycleAwareSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMessageListenSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFailFastNodeFailureDetectionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteSlowClientDetectionSelfTest.class));
-        GridTestUtils.addTestIfNeeded(suite, IgniteDaemonNodeMarshallerCacheTest.class, ignoredTests);
-        suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheConcurrentReadWriteTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNodeMetricsLogSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLocalIgniteSerializationTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMBeansTest.class));
-        suite.addTest(new JUnit4TestAdapter(TransactionsMXBeanImplTest.class));
-        suite.addTest(new JUnit4TestAdapter(SetTxTimeoutOnPartitionMapExchangeTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(IgniteExceptionInNioWorkerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteLocalNodeMapBeforeStartTest.class));
-        suite.addTest(new JUnit4TestAdapter(OdbcConfigurationValidationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(OdbcEscapeSequenceSelfTest.class));
-
-        GridTestUtils.addTestIfNeeded(suite, DynamicProxySerializationMultiJvmSelfTest.class, ignoredTests);
-
-        // Tests against configuration variations framework.
-        suite.addTest(new JUnit4TestAdapter(ParametersTest.class));
-        suite.addTest(new JUnit4TestAdapter(VariationsIteratorTest.class));
-        suite.addTest(new JUnit4TestAdapter(ConfigVariationsTestSuiteBuilderTest.class));
-        suite.addTest(new JUnit4TestAdapter(NotStringSystemPropertyTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(MarshallerContextLockingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(MarshallerContextSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(SecurityPermissionSetBuilderTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(AttributeNodeFilterSelfTest.class));
-
-        // Basic DB data structures.
-        suite.addTest(new JUnit4TestAdapter(BPlusTreeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BPlusTreeFakeReuseSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BPlusTreeReuseSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IndexStorageSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheFreeListImplSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(DataRegionMetricsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(SwapPathConstructionSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheFSRestoreTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheClassNameConflictTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesMultipleConnectionsTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(IgniteRejectConnectOnNodeStopTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(GridCleanerTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(ClassSetTest.class));
-
-        // Basic failure handlers.
-        suite.addTest(new JUnit4TestAdapter(FailureHandlerTriggeredTest.class));
-        suite.addTest(new JUnit4TestAdapter(StopNodeFailureHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(StopNodeOrHaltFailureHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(OomFailureHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(TransactionIntegrityWithSystemWorkerDeathTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(AtomicOperationsInTxTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(CacheRebalanceConfigValidationTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(ListeningTestLoggerTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(CacheLocalGetSerializationTest.class));
-
-        return suite;
-    }
 }
index e5d4165..d0a251a 100644 (file)
@@ -17,9 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.failure.FailureHandlingConfigurationTest;
 import org.apache.ignite.failure.IoomFailureHandlerTest;
 import org.apache.ignite.failure.SystemWorkersBlockingTest;
@@ -38,51 +35,35 @@ import org.apache.ignite.marshaller.GridMarshallerMappingConsistencyTest;
 import org.apache.ignite.util.GridCommandHandlerSslTest;
 import org.apache.ignite.util.GridCommandHandlerTest;
 import org.apache.ignite.util.GridInternalTaskUnusedWalSegmentsTest;
-import org.jetbrains.annotations.Nullable;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Basic test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteBasicWithPersistenceTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Tests don't include in the execution. Providing null means nothing to exclude.
-     * @return Test suite.
-     */
-    public static TestSuite suite(@Nullable final Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Basic With Persistence Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(IoomFailureHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(ClusterBaselineNodesMetricsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMarshallerMappingConsistencyTest.class));
-        suite.addTest(new JUnit4TestAdapter(SystemWorkersTerminationTest.class));
-        suite.addTest(new JUnit4TestAdapter(FailureHandlingConfigurationTest.class));
-        suite.addTest(new JUnit4TestAdapter(SystemWorkersBlockingTest.class));
-        suite.addTest(new JUnit4TestAdapter(CheckpointReadLockFailureTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IoomFailureHandlerTest.class,
+    ClusterBaselineNodesMetricsSelfTest.class,
+    GridMarshallerMappingConsistencyTest.class,
+    SystemWorkersTerminationTest.class,
+    FailureHandlingConfigurationTest.class,
+    SystemWorkersBlockingTest.class,
+    CheckpointReadLockFailureTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridCommandHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCommandHandlerSslTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridInternalTaskUnusedWalSegmentsTest.class));
+    GridCommandHandlerTest.class,
+    GridCommandHandlerSslTest.class,
+    GridInternalTaskUnusedWalSegmentsTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridNodeMetricsLogPdsSelfTest.class));
+    GridNodeMetricsLogPdsSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(EncryptedCacheBigEntryTest.class));
-        suite.addTest(new JUnit4TestAdapter(EncryptedCacheCreateTest.class));
-        suite.addTest(new JUnit4TestAdapter(EncryptedCacheDestroyTest.class));
-        suite.addTest(new JUnit4TestAdapter(EncryptedCacheGroupCreateTest.class));
-        suite.addTest(new JUnit4TestAdapter(EncryptedCacheNodeJoinTest.class));
-        suite.addTest(new JUnit4TestAdapter(EncryptedCacheRestartTest.class));
-        suite.addTest(new JUnit4TestAdapter(EncryptedCachePreconfiguredRestartTest.class));
-
-        return suite;
-    }
+    EncryptedCacheBigEntryTest.class,
+    EncryptedCacheCreateTest.class,
+    EncryptedCacheDestroyTest.class,
+    EncryptedCacheGroupCreateTest.class,
+    EncryptedCacheNodeJoinTest.class,
+    EncryptedCacheRestartTest.class,
+    EncryptedCachePreconfiguredRestartTest.class,
+})
+public class IgniteBasicWithPersistenceTestSuite {
 }
index 195771a..211ba3d 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheMvccSelfTest;
@@ -38,17 +39,18 @@ import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCa
 import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalExpiryPolicyTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Cache suite with binary marshaller.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteBinaryCacheTestSuite.DynamicSuite.class)
 public class IgniteBinaryCacheTestSuite {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(new HashSet<>());
     }
 
@@ -56,9 +58,7 @@ public class IgniteBinaryCacheTestSuite {
      * @param ignoredTests Tests to ignore.
      * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Binary Cache Test Suite");
-
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
         // Tests below have a special version for Binary Marshaller
         ignoredTests.add(GridCacheAffinityRoutingSelfTest.class);
         ignoredTests.add(IgniteCacheAtomicLocalExpiryPolicyTest.class);
@@ -67,7 +67,7 @@ public class IgniteBinaryCacheTestSuite {
         // Tests that are not ready to be used with BinaryMarshaller
         ignoredTests.add(GridCacheMvccSelfTest.class);
 
-        suite.addTest(IgniteCacheTestSuite.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteCacheTestSuite.suite(ignoredTests));
 
         GridTestUtils.addTestIfNeeded(suite, GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.class, ignoredTests);
@@ -87,4 +87,12 @@ public class IgniteBinaryCacheTestSuite {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 1b77812..bb29572 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryTransactionalEntryProcessorDeploymentSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.config.GridTestProperties;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *  IgniteBinaryObjectsCacheTestSuite3 is kept together with {@link IgniteCacheTestSuite3}
@@ -42,28 +44,36 @@ import org.junit.runners.AllTests;
  *  In future this suite may be merged with {@link IgniteCacheTestSuite3}
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteBinaryObjectsCacheTestSuite3.DynamicSuite.class)
 public class IgniteBinaryObjectsCacheTestSuite3 {
     /**
      * @return Test suite.
      */
-    public static TestSuite suite()  {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
         GridTestProperties.setProperty(GridTestProperties.ENTRY_PROCESSOR_CLASS_NAME,
             "org.apache.ignite.tests.p2p.CacheDeploymentBinaryEntryProcessor");
 
-        TestSuite suite = IgniteCacheTestSuite3.suite(ignoredTests);
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite,GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite,GridCacheBinaryTransactionalEntryProcessorDeploymentSelfTest.class, ignoredTests);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 84d0461..d80eaac 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.GridComputationBinarylizableClosuresSelfTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
 
 /**
  *
  */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteComputeGridTestSuite.class,
+    GridComputationBinarylizableClosuresSelfTest.class
+})
 public class IgniteBinaryObjectsComputeGridTestSuite {
-    /**
-     * @return Test suite.
-     * @throws Exception If failed.
-     */
-    public static TestSuite suite() throws Exception {
-        TestSuite suite = IgniteComputeGridTestSuite.suite();
-
-        suite.addTest(new JUnit4TestAdapter(GridComputationBinarylizableClosuresSelfTest.class));
-
-        return suite;
-    }
 }
index d3ea755..b655c04 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.testframework.config.GridTestProperties;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
 
 /**
  *
  */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({IgniteComputeGridTestSuite.class})
 public class IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite {
-    /**
-     * @return Test suite.
-     * @throws Exception If failed.
-     */
-    public static TestSuite suite() throws Exception {
+    /** */
+    @BeforeClass
+    public static void init() {
         GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
         GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true");
-
-        return IgniteComputeGridTestSuite.suite();
     }
 }
index 7f3311a..1fd50d5 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.binary.BinaryArrayIdentityResolverSelfTest;
 import org.apache.ignite.internal.binary.BinaryBasicIdMapperSelfTest;
 import org.apache.ignite.internal.binary.BinaryBasicNameMapperSelfTest;
@@ -74,93 +72,86 @@ import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryO
 import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateChangingTopologySelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test for binary objects stored in cache.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    BinarySimpleNameTestPropertySelfTest.class,
+
+    BinaryBasicIdMapperSelfTest.class,
+    BinaryBasicNameMapperSelfTest.class,
+
+    BinaryTreeSelfTest.class,
+    BinaryMarshallerSelfTest.class,
+    BinaryObjectExceptionSelfTest.class,
+
+    BinarySerialiedFieldComparatorSelfTest.class,
+    BinaryArrayIdentityResolverSelfTest.class,
+
+    BinaryConfigurationConsistencySelfTest.class,
+    BinaryConfigurationCustomSerializerSelfTest.class,
+    GridBinaryMarshallerCtxDisabledSelfTest.class,
+    BinaryObjectBuilderDefaultMappersSelfTest.class,
+    BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest.class,
+    BinaryObjectBuilderAdditionalSelfTest.class,
+    //BinaryFieldExtractionSelfTest.class,
+    BinaryFieldsHeapSelfTest.class,
+    BinaryFieldsOffheapSelfTest.class,
+    BinaryFooterOffsetsHeapSelfTest.class,
+    BinaryFooterOffsetsOffheapSelfTest.class,
+    BinaryEnumsSelfTest.class,
+    GridDefaultBinaryMappersBinaryMetaDataSelfTest.class,
+    GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.class,
+    GridBinaryAffinityKeySelfTest.class,
+    GridBinaryWildcardsSelfTest.class,
+    BinaryObjectToStringSelfTest.class,
+    BinaryObjectTypeCompatibilityTest.class,
+
+    // Tests for objects with non-compact footers.
+    BinaryMarshallerNonCompactSelfTest.class,
+    BinaryObjectBuilderNonCompactDefaultMappersSelfTest.class,
+    BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.class,
+    BinaryObjectBuilderAdditionalNonCompactSelfTest.class,
+    BinaryFieldsHeapNonCompactSelfTest.class,
+    BinaryFieldsOffheapNonCompactSelfTest.class,
+    BinaryFooterOffsetsHeapNonCompactSelfTest.class,
+    BinaryFooterOffsetsOffheapNonCompactSelfTest.class,
+
+    GridCacheBinaryObjectsLocalSelfTest.class,
+    //GridCacheBinaryObjectsLocalOnheapSelfTest.class,
+    GridCacheBinaryObjectsAtomicLocalSelfTest.class,
+    GridCacheBinaryObjectsReplicatedSelfTest.class,
+    GridCacheBinaryObjectsPartitionedSelfTest.class,
+    GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class,
+    //GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.class,
+    //GridCacheBinaryObjectsPartitionedOnheapSelfTest.class,
+    GridCacheBinaryObjectsAtomicSelfTest.class,
+    //GridCacheBinaryObjectsAtomicOnheapSelfTest.class,
+    GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class,
+    //GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.class,
+
+    GridCacheBinaryStoreObjectsSelfTest.class,
+    GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class,
+    GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.class,
+
+    GridCacheClientNodeBinaryObjectMetadataTest.class,
+    GridCacheBinaryObjectMetadataExchangeMultinodeTest.class,
+    BinaryMetadataUpdatesFlowTest.class,
+    GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class,
+    IgniteBinaryMetadataUpdateChangingTopologySelfTest.class,
+
+    BinaryTxCacheLocalEntriesSelfTest.class,
+    BinaryAtomicCacheLocalEntriesSelfTest.class,
+
+    // Byte order
+    BinaryHeapStreamByteOrderSelfTest.class,
+    BinaryAbstractOutputStreamTest.class,
+    BinaryOffheapStreamByteOrderSelfTest.class,
+
+    GridCacheBinaryObjectUserClassloaderSelfTest.class
+})
 public class IgniteBinaryObjectsTestSuite {
-    /**
-     * @return Suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Binary Objects Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(BinarySimpleNameTestPropertySelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(BinaryBasicIdMapperSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryBasicNameMapperSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(BinaryTreeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryMarshallerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectExceptionSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(BinarySerialiedFieldComparatorSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryArrayIdentityResolverSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(BinaryConfigurationConsistencySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryConfigurationCustomSerializerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridBinaryMarshallerCtxDisabledSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderDefaultMappersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderAdditionalSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(BinaryFieldExtractionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFieldsHeapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFieldsOffheapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsHeapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsOffheapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryEnumsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDefaultBinaryMappersBinaryMetaDataSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridBinaryAffinityKeySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridBinaryWildcardsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectToStringSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectTypeCompatibilityTest.class));
-
-        // Tests for objects with non-compact footers.
-        suite.addTest(new JUnit4TestAdapter(BinaryMarshallerNonCompactSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderNonCompactDefaultMappersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderAdditionalNonCompactSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFieldsHeapNonCompactSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFieldsOffheapNonCompactSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsHeapNonCompactSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsOffheapNonCompactSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsLocalSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsLocalOnheapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicLocalSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsReplicatedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedOnheapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicOnheapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryStoreObjectsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(GridCacheClientNodeBinaryObjectMetadataTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectMetadataExchangeMultinodeTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryMetadataUpdatesFlowTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteBinaryMetadataUpdateChangingTopologySelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(BinaryTxCacheLocalEntriesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryAtomicCacheLocalEntriesSelfTest.class));
-
-        // Byte order
-        suite.addTest(new JUnit4TestAdapter(BinaryHeapStreamByteOrderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryAbstractOutputStreamTest.class));
-        suite.addTest(new JUnit4TestAdapter(BinaryOffheapStreamByteOrderSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectUserClassloaderSelfTest.class));
-
-        return suite;
-    }
 }
index d13a073..99540a9 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.testframework.config.GridTestProperties;
+import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Basic test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({IgniteBasicTestSuite.class})
 public class IgniteBinarySimpleNameMapperBasicTestSuite {
-    /**
-     * @return Test suite.
-     * @throws Exception Thrown in case of the failure.
-     */
-    public static TestSuite suite() throws Exception {
+    /** */
+    @BeforeClass
+    public static void init() {
         GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
         GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true");
-
-        return IgniteBasicTestSuite.suite();
     }
 }
index a7c839c..8687390 100755 (executable)
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnGetAllTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnScanTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnSingleGetTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheBlockExchangeOnReadOperationsTestSuite.DynamicSuite.class)
 public class IgniteCacheBlockExchangeOnReadOperationsTestSuite {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
@@ -42,13 +43,21 @@ public class IgniteCacheBlockExchangeOnReadOperationsTestSuite {
      * @param ignoredTests Tests to ignore.
      * @return Test suite.
      */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Do Not Block Read Operations Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
-        suite.addTest(new JUnit4TestAdapter(CacheBlockOnSingleGetTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheBlockOnGetAllTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheBlockOnScanTest.class));
+        suite.add(CacheBlockOnSingleGetTest.class);
+        suite.add(CacheBlockOnGetAllTest.class);
+        suite.add(CacheBlockOnScanTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 6680890..9d12ee5 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.GridCachePreloadingEvictionsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEvictionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearEvictionSelfTest;
@@ -51,20 +52,17 @@ import org.apache.ignite.internal.processors.cache.eviction.paged.RandomLruPageE
 import org.apache.ignite.internal.processors.cache.eviction.sorted.SortedEvictionPolicyFactorySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.sorted.SortedEvictionPolicySelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
 
 /**
  * Test suite for cache eviction.
  */
-@RunWith(AllTests.class)
 public class IgniteCacheEvictionSelfTestSuite {
     /**
      * @param ignoredTests Ignored tests.
      * @return Cache eviction test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Cache Eviction Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, FifoEvictionPolicySelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, SortedEvictionPolicySelfTest.class, ignoredTests);
index 8baa8fa..ed447fd 100644 (file)
@@ -17,9 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.GridCacheIncrementTransformTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheAtomicNodeJoinTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheSizeFailoverTest;
@@ -40,62 +37,44 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNea
 import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionDistributionTest;
 import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteChangingBaselineDownCacheRemoveFailoverTest;
 import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteChangingBaselineUpCacheRemoveFailoverTest;
-import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteCacheFailoverTestSuite {
-    /**
-     * @return Ignite Cache Failover test suite.
-     * @throws Exception Thrown in case of the failure.
-     */
-    public static TestSuite suite() throws Exception {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Tests don't include in the execution.
-     * @return Test suite.
-     * @throws Exception Thrown in case of the failure.
-     */
-    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
-        TestSuite suite = new TestSuite("Cache Failover Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridCacheAtomicInvalidPartitionHandlingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientInvalidPartitionHandlingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingPartitionDistributionTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridCacheAtomicInvalidPartitionHandlingSelfTest.class,
+    GridCacheAtomicClientInvalidPartitionHandlingSelfTest.class,
+    GridCacheRebalancingPartitionDistributionTest.class,
 
-        GridTestUtils.addTestIfNeeded(suite, GridCacheIncrementTransformTest.class, ignoredTests);
+    GridCacheIncrementTransformTest.class,
 
-        // Failure consistency tests.
-        suite.addTest(new JUnit4TestAdapter(GridCacheAtomicRemoveFailureTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientRemoveFailureTest.class));
+    // Failure consistency tests.
+    GridCacheAtomicRemoveFailureTest.class,
+    GridCacheAtomicClientRemoveFailureTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridCacheDhtAtomicRemoveFailureTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheDhtRemoveFailureTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheDhtClientRemoveFailureTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheNearRemoveFailureTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearRemoveFailureTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineUpCacheRemoveFailoverTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineDownCacheRemoveFailoverTest.class));
+    GridCacheDhtAtomicRemoveFailureTest.class,
+    GridCacheDhtRemoveFailureTest.class,
+    GridCacheDhtClientRemoveFailureTest.class,
+    GridCacheNearRemoveFailureTest.class,
+    GridCacheAtomicNearRemoveFailureTest.class,
+    IgniteChangingBaselineUpCacheRemoveFailoverTest.class,
+    IgniteChangingBaselineDownCacheRemoveFailoverTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNodeJoinTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxNodeJoinTest.class));
+    IgniteCacheAtomicNodeJoinTest.class,
+    IgniteCacheTxNodeJoinTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheTxNearDisabledPutGetRestartTest.class));
+    IgniteCacheTxNearDisabledPutGetRestartTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheSizeFailoverTest.class));
+    IgniteCacheSizeFailoverTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteAtomicLongChangingTopologySelfTest.class));
+    IgniteAtomicLongChangingTopologySelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridCacheTxNodeFailureSelfTest.class));
+    GridCacheTxNodeFailureSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(AtomicPutAllChangingTopologyTest.class));
-
-        return suite;
-    }
+    AtomicPutAllChangingTopologyTest.class,
+})
+public class IgniteCacheFailoverTestSuite {
 }
index ee2feee..2f6833a 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedIteratorsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedIteratorsSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalIteratorsSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
 
 /**
  * Cache iterators test suite.
  */
-@RunWith(AllTests.class)
 public class IgniteCacheIteratorsSelfTestSuite {
     /**
      * @param ignoredTests Ignored tests.
      * @return Cache iterators test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Cache Iterators Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, GridCacheLocalIteratorsSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, GridCacheReplicatedIteratorsSelfTest.class, ignoredTests);
index 88ad480..b3de38f 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.TransactionMetricsMxBeanImplTest;
 import org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest;
 import org.apache.ignite.internal.processors.cache.CacheMetricsEntitiesCountTest;
@@ -40,20 +41,17 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalTck
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicMetricsNoReadThroughSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalMetricsSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
 
 /**
  * Test suite for cache metrics.
  */
-@RunWith(AllTests.class)
 public class IgniteCacheMetricsSelfTestSuite {
     /**
      * @param ignoredTests Ignored tests.
      * @return Cache metrics test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Cache Metrics Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, GridCacheLocalMetricsSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, GridCacheLocalAtomicMetricsNoReadThroughSelfTest.class, ignoredTests);
index ae3680d..6e8cde9 100755 (executable)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.IgniteCacheEntryProcessorSequentialCallTest;
 import org.apache.ignite.cache.IgniteWarmupClosureSelfTest;
@@ -112,21 +112,20 @@ import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocal
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheEntryProcessorExternalizableFailedTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheEntryProcessorNonSerializableTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite1.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite1 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 1");
-
         Set<Class> ignoredTests = new HashSet<>();
 
         // Skip classes that already contains Mvcc tests
@@ -236,14 +235,22 @@ public class IgniteCacheMvccTestSuite1 {
         ignoredTests.add(IgniteCacheTxInvokeTest.class); // See IgniteCacheMvccTxInvokeTest.
         ignoredTests.add(IgniteCacheTxNearEnabledInvokeTest.class); // See IgniteCacheMvccTxNearEnabledInvokeTest.
 
-        suite.addTest(IgniteBinaryCacheTestSuite.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteBinaryCacheTestSuite.suite(ignoredTests));
 
         // Add Mvcc clones.
-        suite.addTest(new JUnit4TestAdapter(GridCacheMvccMultiThreadedUpdateSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheMvccTxFastFinishTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheMvccTxInvokeTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheMvccTxNearEnabledInvokeTest.class));
+        suite.add(GridCacheMvccMultiThreadedUpdateSelfTest.class);
+        suite.add(CacheMvccTxFastFinishTest.class);
+        suite.add(IgniteCacheMvccTxInvokeTest.class);
+        suite.add(IgniteCacheMvccTxNearEnabledInvokeTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index d580478..4393e1f 100644 (file)
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilterSelfTest;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionBackupFilterSelfTest;
@@ -90,17 +90,18 @@ import org.apache.ignite.internal.processors.cache.persistence.MemoryPolicyIniti
 import org.apache.ignite.internal.processors.continuous.IgniteContinuousQueryMetadataUpdateTest;
 import org.apache.ignite.internal.processors.continuous.IgniteNoCustomEventsOnNodeStart;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite2.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite2 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         HashSet<Class> ignoredTests = new HashSet<>(128);
@@ -187,17 +188,23 @@ public class IgniteCacheMvccTestSuite2 {
         ignoredTests.add(GridCachePartitionedNearDisabledTxMultiThreadedSelfTest.class); // See GridCachePartitionedNearDisabledMvccTxMultiThreadedSelfTest
         ignoredTests.add(GridCachePartitionedTxTimeoutSelfTest.class); // See GridCachePartitionedMvccTxTimeoutSelfTest
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 2");
-
-        suite.addTest(IgniteCacheTestSuite2.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteCacheTestSuite2.suite(ignoredTests));
 
         // Add Mvcc clones.
-        suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMvccTxSingleThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheColocatedMvccTxSingleThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMvccTxMultiThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMvccTxMultiThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMvccTxTimeoutSelfTest.class));
+        suite.add(GridCachePartitionedMvccTxSingleThreadedSelfTest.class);
+        suite.add(GridCacheColocatedMvccTxSingleThreadedSelfTest.class);
+        suite.add(GridCachePartitionedMvccTxMultiThreadedSelfTest.class);
+        suite.add(GridCachePartitionedNearDisabledMvccTxMultiThreadedSelfTest.class);
+        suite.add(GridCachePartitionedMvccTxTimeoutSelfTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index da9db3c..340a808 100644 (file)
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.CacheInterceptorPartitionCounterLocalSanityTest;
 import org.apache.ignite.internal.processors.cache.CacheInterceptorPartitionCounterRandomOperationsTest;
@@ -58,17 +58,18 @@ import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindSto
 import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreAtomicTest;
 import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreNonCoalescingTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite3.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite3 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         HashSet<Class> ignoredTests = new HashSet<>();
@@ -123,15 +124,21 @@ public class IgniteCacheMvccTestSuite3 {
         ignoredTests.add(GridCacheReplicatedTxMultiThreadedSelfTest.class); // See GridCacheReplicatedMvccTxMultiThreadedSelfTest
         ignoredTests.add(GridCacheReplicatedTxTimeoutSelfTest.class); // See GridCacheReplicatedMvccTxTimeoutSelfTest
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 3");
-
-        suite.addTest(IgniteBinaryObjectsCacheTestSuite3.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteBinaryObjectsCacheTestSuite3.suite(ignoredTests));
 
         // Add Mvcc clones.
-        suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMvccTxSingleThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMvccTxMultiThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMvccTxTimeoutSelfTest.class));
+        suite.add(GridCacheReplicatedMvccTxSingleThreadedSelfTest.class);
+        suite.add(GridCacheReplicatedMvccTxMultiThreadedSelfTest.class);
+        suite.add(GridCacheReplicatedMvccTxTimeoutSelfTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 22cacc4..893c544 100644 (file)
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledAtomicCacheTest;
 import org.apache.ignite.internal.processors.cache.CacheConnectionLeakStoreTxTest;
@@ -92,17 +92,18 @@ import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLo
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite4.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite4 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         HashSet<Class> ignoredTests = new HashSet<>(128);
@@ -189,13 +190,19 @@ public class IgniteCacheMvccTestSuite4 {
         // TODO IGNITE-10175: refactor these tests (use assume) to support both mvcc and non-mvcc modes after moving to JUnit4/5.
         ignoredTests.add(IgniteCrossCacheTxSelfTest.class);
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 4");
-
-        suite.addTest(IgniteCacheTestSuite4.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteCacheTestSuite4.suite(ignoredTests));
 
         // Add Mvcc clones.
-        suite.addTest(new JUnit4TestAdapter(IgniteCrossCacheMvccTxSelfTest.class));
+        suite.add(IgniteCrossCacheMvccTxSelfTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 91f0b71..a5abdc6 100644 (file)
@@ -18,7 +18,7 @@
 package org.apache.ignite.testsuites;
 
 import java.util.HashSet;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.GridCacheAffinityBackupsSelfTest;
 import org.apache.ignite.IgniteCacheAffinitySelfTest;
 import org.apache.ignite.IgniteSystemProperties;
@@ -44,17 +44,18 @@ import org.apache.ignite.internal.processors.cache.distributed.rebalancing.Cache
 import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheSyncRebalanceModeSelfTest;
 import org.apache.ignite.internal.processors.cache.store.IgniteCacheWriteBehindNoUpdateSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite5.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite5 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         HashSet<Class> ignoredTests = new HashSet<>(128);
@@ -88,10 +89,14 @@ public class IgniteCacheMvccTestSuite5 {
         ignoredTests.add(GridCachePartitionExchangeManagerHistSizeTest.class);
         ignoredTests.add(ConcurrentCacheStartTest.class);
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 5");
-
-        suite.addTest(IgniteCacheTestSuite5.suite(ignoredTests));
+        return IgniteCacheTestSuite5.suite(ignoredTests);
+    }
 
-        return suite;
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
     }
 }
index f5bf0e3..5f803bd 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.PartitionedAtomicCacheGetsDistributionTest;
 import org.apache.ignite.internal.processors.cache.PartitionedMvccTxPessimisticCacheGetsDistributionTest;
@@ -41,17 +41,18 @@ import org.apache.ignite.internal.processors.cache.transactions.TxOptimisticPrep
 import org.apache.ignite.internal.processors.cache.transactions.TxRollbackOnTimeoutOnePhaseCommitTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxStateChangeEventTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite6.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite6 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         Set<Class> ignoredTests = new HashSet<>();
@@ -83,14 +84,20 @@ public class IgniteCacheMvccTestSuite6 {
         ignoredTests.add(PartitionedTransactionalPessimisticCacheGetsDistributionTest.class); // See PartitionedMvccTxPessimisticCacheGetsDistributionTest.
         ignoredTests.add(ReplicatedTransactionalPessimisticCacheGetsDistributionTest.class); //See ReplicatedMvccTxPessimisticCacheGetsDistributionTest
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 6");
-
-        suite.addTest(IgniteCacheTestSuite6.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>((IgniteCacheTestSuite6.suite(ignoredTests)));
 
         // Add mvcc versions for skipped tests.
-        suite.addTest(new JUnit4TestAdapter(PartitionedMvccTxPessimisticCacheGetsDistributionTest.class));
-        suite.addTest(new JUnit4TestAdapter(ReplicatedMvccTxPessimisticCacheGetsDistributionTest.class));
+        suite.add(PartitionedMvccTxPessimisticCacheGetsDistributionTest.class);
+        suite.add(ReplicatedMvccTxPessimisticCacheGetsDistributionTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 83d5cd3..c4b486c 100644 (file)
@@ -16,9 +16,9 @@
  */
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.authentication.Authentication1kUsersNodeRestartTest;
 import org.apache.ignite.internal.processors.authentication.AuthenticationConfigurationClusterTest;
@@ -36,17 +36,18 @@ import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridC
 import org.apache.ignite.internal.processors.cache.eviction.paged.PageEvictionMultinodeMixedRegionsTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.CheckpointBufferDeadlockTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite7.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite7 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         HashSet<Class> ignoredTests = new HashSet<>(128);
@@ -70,17 +71,22 @@ public class IgniteCacheMvccTestSuite7 {
         ignoredTests.add(CacheGroupMetricsMBeanTest.class); // See MvccCacheGroupMetricsMBeanTest
         ignoredTests.add(GridCacheRebalancingPartitionCountersTest.class); // See GridCacheRebalancingPartitionCountersMvccTest
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 7");
-
-        suite.addTest(IgniteCacheTestSuite7.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteCacheTestSuite7.suite(ignoredTests));
 
         // Add Mvcc clones.
-        suite.addTest(new JUnit4TestAdapter(MvccCacheGroupMetricsMBeanTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingPartitionCountersMvccTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingWithAsyncClearingMvccTest.class));
+        suite.add(MvccCacheGroupMetricsMBeanTest.class);
+        suite.add(GridCacheRebalancingPartitionCountersMvccTest.class);
+        suite.add(GridCacheRebalancingWithAsyncClearingMvccTest.class);
 
 
         return suite;
     }
 
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 28732af..79a9b9a 100644 (file)
@@ -16,9 +16,9 @@
  */
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorNearPartitionedAtomicCacheGroupsTest;
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorNearPartitionedAtomicCacheTest;
@@ -59,17 +59,18 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalMet
 import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalTckMetricsSelfTestImpl;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicMetricsNoReadThroughSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite8.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite8 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         HashSet<Class> ignoredTests = new HashSet<>(128);
@@ -122,14 +123,19 @@ public class IgniteCacheMvccTestSuite8 {
         // TODO IGNITE-10175: refactor these tests (use assume) to support both mvcc and non-mvcc modes after moving to JUnit4/5.
         ignoredTests.add(GridCacheNearEvictionSelfTest.class); // See GridCacheMvccNearEvictionSelfTest
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 8");
-
-        suite.addTest(IgniteCacheTestSuite8.suite(ignoredTests));
+        List<Class<?>> suite = new ArrayList<>(IgniteCacheTestSuite8.suite(ignoredTests));
 
         // Add Mvcc clones.
-        suite.addTest(new JUnit4TestAdapter(GridCacheMvccNearEvictionSelfTest.class));
+        suite.add(GridCacheMvccNearEvictionSelfTest.class);
 
         return suite;
     }
 
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index ce9533f..fa856cb 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.IgniteCacheGetCustomCollectionsSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheLoadRebalanceEvictionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheAtomicPrimarySyncBackPressureTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteTxConcurrentRemoveObjectsTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheMvccTestSuite9.DynamicSuite.class)
 public class IgniteCacheMvccTestSuite9 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
         Collection<Class> ignoredTests = new HashSet<>();
@@ -51,10 +53,14 @@ public class IgniteCacheMvccTestSuite9 {
         ignoredTests.add(IgniteCacheGetCustomCollectionsSelfTest.class);
         ignoredTests.add(IgniteCacheLoadRebalanceEvictionSelfTest.class);
 
-        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 9");
-
-        suite.addTest(IgniteCacheTestSuite9.suite(ignoredTests));
+        return new ArrayList<>(IgniteCacheTestSuite9.suite(ignoredTests));
+    }
 
-        return suite;
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
     }
 }
index eb163a2..c17517e 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheClientOnlySelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlySelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyTopologySelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite for near-only cache.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheNearOnlySelfTestSuite.DynamicSuite.class)
 public class IgniteCacheNearOnlySelfTestSuite {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Near-only cache test suite.");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite,GridCacheClientOnlySelfTest.CasePartitionedAtomic.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite,GridCacheClientOnlySelfTest.CasePartitionedTransactional.class, ignoredTests);
@@ -59,4 +61,12 @@ public class IgniteCacheNearOnlySelfTestSuite {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 00effea..c319d3d 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingErrorTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingNearErrorTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingRebalanceErrorTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingTxErrorTest;
-import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Checks behavior on exception while unmarshalling key.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteCacheP2pUnmarshallingErrorTest.class,
+    IgniteCacheP2pUnmarshallingNearErrorTest.class,
+    IgniteCacheP2pUnmarshallingRebalanceErrorTest.class,
+    IgniteCacheP2pUnmarshallingTxErrorTest.class,
+})
 public class IgniteCacheP2pUnmarshallingErrorTestSuite {
-    /**
-     * @return Suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Tests don't include in the execution.
-     * @return Test suite.
-     */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("P2p Unmarshalling Test Suite");
-
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingErrorTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingNearErrorTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingRebalanceErrorTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingTxErrorTest.class, ignoredTests);
-
-        return suite;
-    }
 }
index db3e0ec..df66c0c 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.GridCacheTcpClientDiscoveryMultiThreadedTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 import static org.apache.ignite.internal.processors.cache.distributed.GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedAtomic;
 import static org.apache.ignite.internal.processors.cache.distributed.GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedTransactional;
@@ -36,12 +38,12 @@ import static org.apache.ignite.internal.processors.cache.distributed.GridCacheC
 /**
  * Tests a cache with TcpClientDiscovery SPI being enabled.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTcpClientDiscoveryTestSuite.DynamicSuite.class)
 public class IgniteCacheTcpClientDiscoveryTestSuite {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
@@ -49,8 +51,8 @@ public class IgniteCacheTcpClientDiscoveryTestSuite {
      * @param ignoredTests Tests to ignore.
      * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Cache + TcpClientDiscovery SPI test suite.");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, CaseNearPartitionedAtomic.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, CaseNearPartitionedTransactional.class, ignoredTests);
@@ -64,4 +66,12 @@ public class IgniteCacheTcpClientDiscoveryTestSuite {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index dd773e1..250d848 100755 (executable)
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.cache.IgniteCacheEntryProcessorSequentialCallTest;
 import org.apache.ignite.cache.IgniteWarmupClosureSelfTest;
 import org.apache.ignite.cache.store.CacheStoreReadFromBackupTest;
@@ -153,17 +153,18 @@ import org.apache.ignite.internal.processors.datastreamer.DataStreamerTimeoutTes
 import org.apache.ignite.internal.processors.datastreamer.DataStreamerUpdateAfterLoadTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite.DynamicSuite.class)
 public class IgniteCacheTestSuite {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
@@ -171,8 +172,8 @@ public class IgniteCacheTestSuite {
      * @param ignoredTests Tests to ignore.
      * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, IgniteCacheEntryListenerAtomicTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgniteCacheEntryListenerAtomicReplicatedTest.class, ignoredTests);
@@ -301,7 +302,7 @@ public class IgniteCacheTestSuite {
         GridTestUtils.addTestIfNeeded(suite, GridCachePartitionsStateValidatorSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, GridCachePartitionsStateValidationTest.class, ignoredTests);
 
-        suite.addTest(IgniteCacheTcpClientDiscoveryTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheTcpClientDiscoveryTestSuite.suite(ignoredTests));
 
         // Heuristic exception handling.
         GridTestUtils.addTestIfNeeded(suite, GridCacheColocatedTxExceptionSelfTest.class, ignoredTests);
@@ -360,8 +361,16 @@ public class IgniteCacheTestSuite {
 
         GridTestUtils.addTestIfNeeded(suite, BinaryMetadataRegistrationInsideEntryProcessorTest.class, ignoredTests);
 
-        suite.addTest(new JUnit4TestAdapter(IgniteGetNonPlainKeyReadThroughSelfTest.class));
+        suite.add(IgniteGetNonPlainKeyReadThroughSelfTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 308cc84..0257bde 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilterSelfTest;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionBackupFilterSelfTest;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionExcludeNeighborsSelfTest;
@@ -149,26 +150,27 @@ import org.apache.ignite.internal.processors.continuous.IgniteContinuousQueryMet
 import org.apache.ignite.internal.processors.continuous.IgniteNoCustomEventsOnNodeStart;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite2.DynamicSuite.class)
 public class IgniteCacheTestSuite2 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 2");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         // Local cache.
         GridTestUtils.addTestIfNeeded(suite, GridCacheLocalBasicApiSelfTest.class, ignoredTests);
@@ -353,4 +355,12 @@ public class IgniteCacheTestSuite2 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 40e402e..81e0749 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.CacheStartupInDeploymentModesTest;
 import org.apache.ignite.internal.processors.cache.GridCacheAtomicEntryProcessorDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheConditionalDeploymentSelfTest;
@@ -78,26 +79,27 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheDaemonNodeLoca
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalByteArrayValuesSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite3.DynamicSuite.class)
 public class IgniteCacheTestSuite3 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 3");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite,IgniteCacheGroupsTest.class, ignoredTests);
 
@@ -165,7 +167,7 @@ public class IgniteCacheTestSuite3 {
         GridTestUtils.addTestIfNeeded(suite,GridCacheReplicatedP2PDisabledByteArrayValuesSelfTest.class, ignoredTests);
 
         // Near-only cache.
-        suite.addTest(IgniteCacheNearOnlySelfTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheNearOnlySelfTestSuite.suite(ignoredTests));
 
         // Test cache with daemon nodes.
         GridTestUtils.addTestIfNeeded(suite,GridCacheDaemonNodeLocalSelfTest.class, ignoredTests);
@@ -173,7 +175,7 @@ public class IgniteCacheTestSuite3 {
         GridTestUtils.addTestIfNeeded(suite,GridCacheDaemonNodeReplicatedSelfTest.class, ignoredTests);
 
         // Write-behind.
-        suite.addTest(IgniteCacheWriteBehindTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheWriteBehindTestSuite.suite(ignoredTests));
 
         // Transform.
         GridTestUtils.addTestIfNeeded(suite,GridCachePartitionedTransformWriteThroughBatchUpdateSelfTest.class, ignoredTests);
@@ -189,7 +191,7 @@ public class IgniteCacheTestSuite3 {
         GridTestUtils.addTestIfNeeded(suite,GridCacheMixedModeSelfTest.class, ignoredTests);
 
         // Cache interceptor tests.
-        suite.addTest(IgniteCacheInterceptorSelfTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheInterceptorSelfTestSuite.suite(ignoredTests));
 
         GridTestUtils.addTestIfNeeded(suite,IgniteTxGetAfterStopTest.class, ignoredTests);
 
@@ -200,4 +202,12 @@ public class IgniteCacheTestSuite3 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 06a84bb..a1a2f42 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.HashSet;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledAtomicCacheTest;
 import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledTransactionalCacheTest;
 import org.apache.ignite.cache.store.CacheStoreSessionListenerLifecycleSelfTest;
@@ -155,207 +156,215 @@ import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPa
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedTransactionalSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalSelfTest;
+import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
-
-import static org.apache.ignite.testframework.GridTestUtils.addTestIfNeeded;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite4.DynamicSuite.class)
 public class IgniteCacheTestSuite4 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(HashSet<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 4");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         // Multi node update.
-        addTestIfNeeded(suite, GridCacheMultinodeUpdateSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridCacheMultinodeUpdateNearEnabledSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridCacheMultinodeUpdateAtomicSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridCacheMultinodeUpdateAtomicNearEnabledSelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicLoadAllTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicLocalLoadAllTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLoadAllTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLocalLoadAllTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicLoaderWriterTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLoaderWriterTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicStoreSessionTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxStoreSessionTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicStoreSessionWriteBehindTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxStoreSessionWriteBehindTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxStoreSessionWriteBehindCoalescingTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicNoReadThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoReadThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicLocalNoReadThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNoReadThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoReadThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLocalNoReadThroughTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicNoLoadPreviousValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoLoadPreviousValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicLocalNoLoadPreviousValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNoLoadPreviousValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoLoadPreviousValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLocalNoLoadPreviousValueTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicNoWriteThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoWriteThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicLocalNoWriteThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNoWriteThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoWriteThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLocalNoWriteThroughTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicNearPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicReplicatedPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicLocalPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNearPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLocalPeekModesTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxReplicatedPeekModesTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheInvokeReadThroughSingleNodeTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheInvokeReadThroughTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheReadThroughStoreCallTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridCacheVersionMultinodeTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheNearReadCommittedTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicCopyOnReadDisabledTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxCopyOnReadDisabledTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheTxPreloadNoWriteTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteDynamicCacheStartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicCacheMultinodeTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicCacheStartFailTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicCacheStartCoordinatorFailoverTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicCacheWithConfigStartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheDynamicStopSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicCacheStartStopConcurrentTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheConfigurationTemplateTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheConfigurationDefaultTemplateTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicClientCacheStartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteDynamicCacheStartNoExchangeTimeoutTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheAffinityEarlyTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheCreatePutMultiNodeSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheCreatePutTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStartOnJoinTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheStartTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheDiscoveryDataConcurrentJoinTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteClientCacheInitializationFailTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheFailedUpdateResponseTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, GridCacheTxLoadFromStoreOnLockSelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, GridCacheMarshallingNodeJoinSelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheJdbcBlobStoreNodeRestartTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheAtomicLocalStoreValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicStoreValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledStoreValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxLocalStoreValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxStoreValueTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheTxNearEnabledStoreValueTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteCacheLockFailoverSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheMultiTxLockSelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteInternalCacheTypesTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteExchangeFutureHistoryTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheNoValueClassOnServerNodeTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteSystemCacheOnClientTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheRemoveAllSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGetEntryOptimisticReadCommittedSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGetEntryOptimisticRepeatableReadSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGetEntryOptimisticSerializableSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGetEntryPessimisticReadCommittedSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGetEntryPessimisticRepeatableReadSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGetEntryPessimisticSerializableSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheTxNotAllowReadFromBackupTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheStopAndDestroySelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheOffheapMapEntrySelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheJdbcStoreSessionListenerSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreSessionListenerLifecycleSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreListenerRWThroughDisabledAtomicCacheTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreListenerRWThroughDisabledTransactionalCacheTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreSessionListenerWriteBehindEnabledTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheClientStoreSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreUsageMultinodeStaticStartAtomicTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreUsageMultinodeStaticStartTxTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreUsageMultinodeDynamicStartAtomicTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheStoreUsageMultinodeDynamicStartTxTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheConnectionLeakStoreTxTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, GridCacheStoreManagerDeserializationTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridLocalCacheStoreManagerDeserializationTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, IgniteStartCacheInTransactionSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteStartCacheInTransactionAtomicSelfTest.class, ignoredTests);
-
-        addTestIfNeeded(suite, CacheReadThroughRestartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheReadThroughReplicatedRestartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheReadThroughReplicatedAtomicRestartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheReadThroughLocalRestartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheReadThroughLocalAtomicRestartSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheReadThroughAtomicRestartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMultinodeUpdateSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMultinodeUpdateNearEnabledSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMultinodeUpdateAtomicSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMultinodeUpdateAtomicNearEnabledSelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLoadAllTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLocalLoadAllTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLoadAllTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLocalLoadAllTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLoaderWriterTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLoaderWriterTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicStoreSessionTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxStoreSessionTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicStoreSessionWriteBehindTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxStoreSessionWriteBehindTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxStoreSessionWriteBehindCoalescingTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNoReadThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoReadThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLocalNoReadThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNoReadThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoReadThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLocalNoReadThroughTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNoLoadPreviousValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoLoadPreviousValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLocalNoLoadPreviousValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNoLoadPreviousValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoLoadPreviousValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLocalNoLoadPreviousValueTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNoWriteThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoWriteThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLocalNoWriteThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNoWriteThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoWriteThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLocalNoWriteThroughTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNearPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicReplicatedPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLocalPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNearPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLocalPeekModesTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxReplicatedPeekModesTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheInvokeReadThroughSingleNodeTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheInvokeReadThroughTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheReadThroughStoreCallTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheVersionMultinodeTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheNearReadCommittedTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicCopyOnReadDisabledTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxCopyOnReadDisabledTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxPreloadNoWriteTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheMultinodeTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartFailTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartCoordinatorFailoverTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheWithConfigStartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheDynamicStopSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartStopConcurrentTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheConfigurationTemplateTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheConfigurationDefaultTemplateTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicClientCacheStartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartNoExchangeTimeoutTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheAffinityEarlyTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheCreatePutMultiNodeSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheCreatePutTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStartOnJoinTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheStartTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheDiscoveryDataConcurrentJoinTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteClientCacheInitializationFailTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheFailedUpdateResponseTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, GridCacheTxLoadFromStoreOnLockSelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMarshallingNodeJoinSelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheJdbcBlobStoreNodeRestartTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicLocalStoreValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicStoreValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledStoreValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxLocalStoreValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxStoreValueTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxNearEnabledStoreValueTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheLockFailoverSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheMultiTxLockSelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteInternalCacheTypesTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteExchangeFutureHistoryTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheNoValueClassOnServerNodeTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteSystemCacheOnClientTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheRemoveAllSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetEntryOptimisticReadCommittedSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetEntryOptimisticRepeatableReadSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetEntryOptimisticSerializableSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetEntryPessimisticReadCommittedSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetEntryPessimisticRepeatableReadSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetEntryPessimisticSerializableSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheTxNotAllowReadFromBackupTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheStopAndDestroySelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheOffheapMapEntrySelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheJdbcStoreSessionListenerSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreSessionListenerLifecycleSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreListenerRWThroughDisabledAtomicCacheTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreListenerRWThroughDisabledTransactionalCacheTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreSessionListenerWriteBehindEnabledTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheClientStoreSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreUsageMultinodeStaticStartAtomicTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreUsageMultinodeStaticStartTxTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreUsageMultinodeDynamicStartAtomicTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheStoreUsageMultinodeDynamicStartTxTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheConnectionLeakStoreTxTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, GridCacheStoreManagerDeserializationTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridLocalCacheStoreManagerDeserializationTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, IgniteStartCacheInTransactionSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteStartCacheInTransactionAtomicSelfTest.class, ignoredTests);
+
+        GridTestUtils.addTestIfNeeded(suite, CacheReadThroughRestartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheReadThroughReplicatedRestartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheReadThroughReplicatedAtomicRestartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheReadThroughLocalRestartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheReadThroughLocalAtomicRestartSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheReadThroughAtomicRestartSelfTest.class, ignoredTests);
 
         // Versioned entry tests
-        addTestIfNeeded(suite, CacheVersionedEntryLocalAtomicSwapDisabledSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheVersionedEntryLocalTransactionalSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheVersionedEntryPartitionedAtomicSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheVersionedEntryPartitionedTransactionalSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheVersionedEntryReplicatedAtomicSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheVersionedEntryReplicatedTransactionalSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheVersionedEntryLocalAtomicSwapDisabledSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheVersionedEntryLocalTransactionalSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheVersionedEntryPartitionedAtomicSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheVersionedEntryPartitionedTransactionalSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheVersionedEntryReplicatedAtomicSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheVersionedEntryReplicatedTransactionalSelfTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, GridCacheDhtTxPreloadSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridCacheNearTxPreloadSelfTest.class, ignoredTests);
-        addTestIfNeeded(suite, GridReplicatedTxPreloadTest.class, ignoredTests);
-        addTestIfNeeded(suite, CacheGroupsPreloadTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheDhtTxPreloadSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheNearTxPreloadSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridReplicatedTxPreloadTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGroupsPreloadTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, IgniteDynamicCacheFilterTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheFilterTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, CrossCacheLockTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCrossCacheTxSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CrossCacheLockTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCrossCacheTxSelfTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, CacheGetFutureHangsSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheGetFutureHangsSelfTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, IgniteCacheSingleGetMessageTest.class, ignoredTests);
-        addTestIfNeeded(suite, IgniteCacheReadFromBackupTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheSingleGetMessageTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheReadFromBackupTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, MarshallerCacheJobRunNodeRestartTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, MarshallerCacheJobRunNodeRestartTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, IgniteCacheNearOnlyTxTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheNearOnlyTxTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, IgniteCacheContainsKeyAtomicTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheContainsKeyAtomicTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, CacheResultIsNotNullOnPartitionLossTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheResultIsNotNullOnPartitionLossTest.class, ignoredTests);
 
-        addTestIfNeeded(suite, CacheEventWithTxLabelTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheEventWithTxLabelTest.class, ignoredTests);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 16b8485..740f2ce 100644 (file)
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.HashSet;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 import org.apache.ignite.GridCacheAffinityBackupsSelfTest;
 import org.apache.ignite.IgniteCacheAffinitySelfTest;
 import org.apache.ignite.cache.affinity.AffinityClientNodeSelfTest;
@@ -52,26 +52,27 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.Ignite
 import org.apache.ignite.internal.processors.cache.store.IgniteCacheWriteBehindNoUpdateSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite5.DynamicSuite.class)
 public class IgniteCacheTestSuite5 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(HashSet<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 5");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite,CacheSerializableTransactionsTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite,CacheNearReaderUpdateTest.class, ignoredTests);
@@ -85,7 +86,7 @@ public class IgniteCacheTestSuite5 {
         GridTestUtils.addTestIfNeeded(suite,EntryVersionConsistencyReadThroughTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite,IgniteCacheSyncRebalanceModeSelfTest.class, ignoredTests);
 
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheReadThroughEvictionsVariationsSuite.class));
+        suite.add(IgniteCacheReadThroughEvictionsVariationsSuite.class);
 
         GridTestUtils.addTestIfNeeded(suite,IgniteCacheTxIteratorSelfTest.class, ignoredTests);
 
@@ -123,4 +124,12 @@ public class IgniteCacheTestSuite5 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 9469b2c..1db0d25 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.CacheNoAffinityExchangeTest;
 import org.apache.ignite.internal.processors.cache.PartitionedAtomicCacheGetsDistributionTest;
 import org.apache.ignite.internal.processors.cache.PartitionedTransactionalOptimisticCacheGetsDistributionTest;
@@ -52,26 +53,27 @@ import org.apache.ignite.internal.processors.cache.transactions.TxRollbackOnTopo
 import org.apache.ignite.internal.processors.cache.transactions.TxStateChangeEventTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite6.DynamicSuite.class)
 public class IgniteCacheTestSuite6 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 6");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, GridCachePartitionEvictionDuringReadThroughSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgniteOptimisticTxSuspendResumeTest.class, ignoredTests);
@@ -128,4 +130,12 @@ public class IgniteCacheTestSuite6 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index f540afd..3702ddb 100755 (executable)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 import org.apache.ignite.internal.processors.authentication.Authentication1kUsersNodeRestartTest;
 import org.apache.ignite.internal.processors.authentication.AuthenticationConfigurationClusterTest;
 import org.apache.ignite.internal.processors.authentication.AuthenticationOnNotActiveClusterTest;
@@ -46,17 +47,18 @@ import org.apache.ignite.internal.processors.cache.transactions.TxRollbackAsyncW
 import org.apache.ignite.internal.processors.cache.transactions.TxWithSmallTimeoutAndContentionOneKeyTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite7.DynamicSuite.class)
 public class IgniteCacheTestSuite7 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
@@ -64,8 +66,8 @@ public class IgniteCacheTestSuite7 {
      * @param ignoredTests Tests to ignore.
      * @return Test suite.
      */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache With Persistence Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, CheckpointBufferDeadlockTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgniteCacheStartWithLoadTest.class, ignoredTests);
@@ -105,4 +107,12 @@ public class IgniteCacheTestSuite7 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index e32658d..2f13e61 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.GridCacheOrderedPreloadingSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRabalancingDelayedPartitionMapExchangeSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingAsyncSelfTest;
@@ -28,37 +29,39 @@ import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridC
 import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingUnmarshallingFailedSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite8.DynamicSuite.class)
 public class IgniteCacheTestSuite8 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 8");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         // Cache metrics.
-        suite.addTest(IgniteCacheMetricsSelfTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheMetricsSelfTestSuite.suite(ignoredTests));
 
         // Topology validator.
-        suite.addTest(IgniteTopologyValidatorTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteTopologyValidatorTestSuite.suite(ignoredTests));
 
         // Eviction.
-        suite.addTest(IgniteCacheEvictionSelfTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheEvictionSelfTestSuite.suite(ignoredTests));
 
         // Iterators.
-        suite.addTest(IgniteCacheIteratorsSelfTestSuite.suite(ignoredTests));
+        suite.addAll(IgniteCacheIteratorsSelfTestSuite.suite(ignoredTests));
 
         // Rebalancing.
         GridTestUtils.addTestIfNeeded(suite, GridCacheOrderedPreloadingSelfTest.class, ignoredTests);
@@ -71,4 +74,12 @@ public class IgniteCacheTestSuite8 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index b9a2dc6..7f66a09 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.CachePutIfAbsentTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheGetCustomCollectionsSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheLoadRebalanceEvictionSelfTest;
@@ -31,26 +32,27 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteTxConcurren
 import org.apache.ignite.internal.processors.cache.transactions.TxDataConsistencyOnCommitFailureTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheTestSuite9.DynamicSuite.class)
 public class IgniteCacheTestSuite9 {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("IgniteCache Test Suite part 9");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, IgniteCacheGetCustomCollectionsSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgniteCacheLoadRebalanceEvictionSelfTest.class, ignoredTests);
@@ -69,4 +71,12 @@ public class IgniteCacheTestSuite9 {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index e7e4050..e439057 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.GridCachePartitionedWritesTest;
 import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStoreLocalTest;
 import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStoreMultithreadedSelfTest;
@@ -31,26 +32,27 @@ import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBe
 import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreTxTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Test suite that contains all tests for {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore}.
  */
-@RunWith(AllTests.class)
+@RunWith(IgniteCacheWriteBehindTestSuite.DynamicSuite.class)
 public class IgniteCacheWriteBehindTestSuite {
     /**
      * @return Ignite Bamboo in-memory data grid test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Write-Behind Store Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         // Write-behind tests.
         GridTestUtils.addTestIfNeeded(suite, GridCacheWriteBehindStoreSelfTest.class, ignoredTests);
@@ -66,4 +68,12 @@ public class IgniteCacheWriteBehindTestSuite {
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 6ec49f7..3682f6c 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.ClusterNodeMetricsSelfTest;
 import org.apache.ignite.internal.ClusterNodeMetricsUpdateTest;
 import org.apache.ignite.internal.GridAffinityNoCacheSelfTest;
@@ -88,99 +86,92 @@ import org.apache.ignite.p2p.GridMultinodeRedeployIsolatedModeSelfTest;
 import org.apache.ignite.p2p.GridMultinodeRedeployPrivateModeSelfTest;
 import org.apache.ignite.p2p.GridMultinodeRedeploySharedModeSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Compute grid test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteComputeGridTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Compute Grid Test Suite");
-
-        suite.addTest(IgniteTaskSessionSelfTestSuite.suite());
-        suite.addTest(IgniteTimeoutProcessorSelfTestSuite.suite());
-        suite.addTest(IgniteJobMetricsSelfTestSuite.suite());
-        suite.addTest(IgniteContinuousTaskSelfTestSuite.suite());
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteTaskSessionSelfTestSuite.class,
+    IgniteTimeoutProcessorSelfTestSuite.class,
+    IgniteJobMetricsSelfTestSuite.class,
+    IgniteContinuousTaskSelfTestSuite.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTaskCancelSingleNodeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskFailoverSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobCollisionCancelSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskTimeoutSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCancelUnusedJobSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskJobRejectSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskExecutionSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridTaskExecutionContextSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskExecutionWithoutPeerClassLoadingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFailoverSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskListenerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFailoverTopologySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskResultCacheSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskMapAsyncSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobContextSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobMasterLeaveAwareSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobSubjectIdSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultithreadedJobStealingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiFailSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskInstanceExecutionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(ClusterNodeMetricsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(ClusterNodeMetricsUpdateTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNonHistoryMetricsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCancelledJobsMetricsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCollisionJobsContextSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingZeroActiveJobsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskFutureImplStopGridSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFailoverCustomTopologySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultipleSpisSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridStopWithWaitSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCancelOnGridStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDeploymentSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDeploymentMultiThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultipleVersionsDeploymentSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteExplicitImplicitDeploymentSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEventStorageCheckAllEventsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCommunicationManagerListenersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteExecutorServiceTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskInstantiationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultipleJobsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCheckpointManagerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCheckpointTaskSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskNameAnnotationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobCheckpointCleanupSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEventStorageSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEventStorageDefaultExceptionTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFailoverTaskWithPredicateSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridProjectionLocalJobMultipleArgumentsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAffinitySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAffinityNoCacheSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridAffinityMappedTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridAffinityP2PSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEventStorageRuntimeConfigurationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeployContinuousModeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeploySharedModeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeployPrivateModeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeployIsolatedModeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteComputeEmptyClusterGroupTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteComputeTopologyExceptionTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteComputeResultExceptionTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskFailoverAffinityRunTest.class));
-        suite.addTest(new JUnit4TestAdapter(TaskNodeRestartTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteRoundRobinErrorAfterClientReconnectTest.class));
-        suite.addTest(new JUnit4TestAdapter(PublicThreadpoolStarvationTest.class));
-        suite.addTest(new JUnit4TestAdapter(StripedExecutorTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobServicesAddNodeTest.class));
+    GridTaskCancelSingleNodeSelfTest.class,
+    GridTaskFailoverSelfTest.class,
+    GridJobCollisionCancelSelfTest.class,
+    GridTaskTimeoutSelfTest.class,
+    GridCancelUnusedJobSelfTest.class,
+    GridTaskJobRejectSelfTest.class,
+    GridTaskExecutionSelfTest.class,
+    //GridTaskExecutionContextSelfTest.class,
+    GridTaskExecutionWithoutPeerClassLoadingSelfTest.class,
+    GridFailoverSelfTest.class,
+    GridTaskListenerSelfTest.class,
+    GridFailoverTopologySelfTest.class,
+    GridTaskResultCacheSelfTest.class,
+    GridTaskMapAsyncSelfTest.class,
+    GridJobContextSelfTest.class,
+    GridJobMasterLeaveAwareSelfTest.class,
+    GridJobStealingSelfTest.class,
+    GridJobSubjectIdSelfTest.class,
+    GridMultithreadedJobStealingSelfTest.class,
+    GridAlwaysFailoverSpiFailSelfTest.class,
+    GridTaskInstanceExecutionSelfTest.class,
+    ClusterNodeMetricsSelfTest.class,
+    ClusterNodeMetricsUpdateTest.class,
+    GridNonHistoryMetricsSelfTest.class,
+    GridCancelledJobsMetricsSelfTest.class,
+    GridCollisionJobsContextSelfTest.class,
+    GridJobStealingZeroActiveJobsSelfTest.class,
+    GridTaskFutureImplStopGridSelfTest.class,
+    GridFailoverCustomTopologySelfTest.class,
+    GridMultipleSpisSelfTest.class,
+    GridStopWithWaitSelfTest.class,
+    GridCancelOnGridStopSelfTest.class,
+    GridDeploymentSelfTest.class,
+    GridDeploymentMultiThreadedSelfTest.class,
+    GridMultipleVersionsDeploymentSelfTest.class,
+    IgniteExplicitImplicitDeploymentSelfTest.class,
+    GridEventStorageCheckAllEventsSelfTest.class,
+    GridCommunicationManagerListenersSelfTest.class,
+    IgniteExecutorServiceTest.class,
+    GridTaskInstantiationSelfTest.class,
+    GridMultipleJobsSelfTest.class,
+    GridCheckpointManagerSelfTest.class,
+    GridCheckpointTaskSelfTest.class,
+    GridTaskNameAnnotationSelfTest.class,
+    GridJobCheckpointCleanupSelfTest.class,
+    GridEventStorageSelfTest.class,
+    GridEventStorageDefaultExceptionTest.class,
+    GridFailoverTaskWithPredicateSelfTest.class,
+    GridProjectionLocalJobMultipleArgumentsSelfTest.class,
+    GridAffinitySelfTest.class,
+    GridAffinityNoCacheSelfTest.class,
+    //GridAffinityMappedTest.class,
+    //GridAffinityP2PSelfTest.class,
+    GridEventStorageRuntimeConfigurationSelfTest.class,
+    GridMultinodeRedeployContinuousModeSelfTest.class,
+    GridMultinodeRedeploySharedModeSelfTest.class,
+    GridMultinodeRedeployPrivateModeSelfTest.class,
+    GridMultinodeRedeployIsolatedModeSelfTest.class,
+    IgniteComputeEmptyClusterGroupTest.class,
+    IgniteComputeTopologyExceptionTest.class,
+    IgniteComputeResultExceptionTest.class,
+    GridTaskFailoverAffinityRunTest.class,
+    TaskNodeRestartTest.class,
+    IgniteRoundRobinErrorAfterClientReconnectTest.class,
+    PublicThreadpoolStarvationTest.class,
+    StripedExecutorTest.class,
+    GridJobServicesAddNodeTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteComputeCustomExecutorConfigurationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteComputeCustomExecutorSelfTest.class));
+    IgniteComputeCustomExecutorConfigurationSelfTest.class,
+    IgniteComputeCustomExecutorSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteComputeJobOneThreadTest.class));
+    IgniteComputeJobOneThreadTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(VisorManagementEventSelfTest.class));
-
-        return suite;
-    }
+    VisorManagementEventSelfTest.class
+})
+public class IgniteComputeGridTestSuite {
 }
index 32297df..4da0d37 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.GridContinuousJobAnnotationSelfTest;
 import org.apache.ignite.internal.GridContinuousJobSiblingsSelfTest;
 import org.apache.ignite.internal.GridContinuousTaskSelfTest;
 import org.apache.ignite.internal.GridTaskContinuousMapperSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Continuous task self-test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridContinuousJobAnnotationSelfTest.class,
+    GridContinuousJobSiblingsSelfTest.class,
+    GridContinuousTaskSelfTest.class,
+    GridTaskContinuousMapperSelfTest.class
+})
 public class IgniteContinuousTaskSelfTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Kernal Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridContinuousJobAnnotationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridContinuousJobSiblingsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridContinuousTaskSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTaskContinuousMapperSelfTest.class));
-
-        return suite;
-    }
-
 }
index 015eb28..a084008 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.database.IgniteDbMultiNodePutGetTest;
 import org.apache.ignite.internal.processors.database.IgniteDbSingleNodePutGetTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteDbSingleNodePutGetTest.class,
+    IgniteDbMultiNodePutGetTest.class
+})
 public class IgniteDatabaseTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Database Tests");
-
-        suite.addTest(new JUnit4TestAdapter(IgniteDbSingleNodePutGetTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDbMultiNodePutGetTest.class));
-
-        return suite;
-    }
 }
index 7a144ae..baf3cd8 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.cache.LargeEntryUpdateTest;
 import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakLargeObjectsTest;
 import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakLargePagesTest;
@@ -26,27 +24,20 @@ import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakNonTrans
 import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakTest;
 import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakWithExpirationTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Page memory leaks tests.
  */
-@RunWith(AllTests.class)
-public class IgniteDbMemoryLeakTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Db Memory Leaks Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakWithExpirationTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakLargePagesTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakLargeObjectsTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakNonTransactionalTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteDbMemoryLeakTest.class,
+    IgniteDbMemoryLeakWithExpirationTest.class,
+    IgniteDbMemoryLeakLargePagesTest.class,
+    IgniteDbMemoryLeakLargeObjectsTest.class,
+    IgniteDbMemoryLeakNonTransactionalTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(LargeEntryUpdateTest.class));
-
-        return suite;
-    }
+    LargeEntryUpdateTest.class
+})
+public class IgniteDbMemoryLeakTestSuite {
 }
index 7f5b7b6..9d5ae8c 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.GridTopicExternalizableSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Externalizable self-test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({GridTopicExternalizableSelfTest.class})
 public class IgniteExternalizableSelfTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Externalizable Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridTopicExternalizableSelfTest.class));
-
-        return suite;
-    }
 }
index c3ce921..508507b 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryCrashDetectionSelfTest;
 import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryNativeLoaderSelfTest;
 import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemorySpaceSelfTest;
 import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryUtilsSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Shared memory test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IpcSharedMemorySpaceSelfTest.class,
+    IpcSharedMemoryUtilsSelfTest.class,
+    IpcSharedMemoryCrashDetectionSelfTest.class,
+    IpcSharedMemoryNativeLoaderSelfTest.class
+})
 public class IgniteIpcSharedMemorySelfTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite IPC Shared Memory Test Suite.");
-
-        suite.addTest(new JUnit4TestAdapter(IpcSharedMemorySpaceSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IpcSharedMemoryUtilsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IpcSharedMemoryCrashDetectionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IpcSharedMemoryNativeLoaderSelfTest.class));
-
-        return suite;
-    }
 }
index df5974e..30ba236 100644 (file)
@@ -16,6 +16,7 @@
 */
 package org.apache.ignite.testsuites;
 
+import junit.framework.JUnit4TestAdapter;
 import junit.framework.TestSuite;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.junit.runner.RunWith;
@@ -28,13 +29,12 @@ import org.junit.runners.AllTests;
 public class IgniteIpcTestSuite {
     /**
      * @return IgniteCache test suite.
-     * @throws Exception Thrown in case of the failure.
      */
-    public static TestSuite suite() throws Exception {
+    public static TestSuite suite() {
         TestSuite suite = new TestSuite("Ignite IPC Shared Memory Suite");
 
         if (U.isLinux() || U.isMacOs())
-            suite.addTest(IgniteIpcSharedMemorySelfTestSuite.suite());
+            suite.addTest(new JUnit4TestAdapter(IgniteIpcSharedMemorySelfTestSuite.class));
 
         return suite;
     }
index d2e9c18..818f0de 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.jobmetrics.GridJobMetricsProcessorLoadTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Job metrics self test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({GridJobMetricsProcessorLoadTest.class})
 public class IgniteJobMetricsSelfTestSuite {
-    /**
-     * @return Job metrics test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Job metrics Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridJobMetricsProcessorLoadTest.class));
-
-        return suite;
-    }
 }
index 9e73096..8081703 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.ClusterMetricsSelfTest;
 import org.apache.ignite.internal.GridCommunicationSelfTest;
 import org.apache.ignite.internal.GridDiscoveryEventSelfTest;
@@ -53,67 +51,50 @@ import org.apache.ignite.internal.processors.cluster.GridUpdateNotifierSelfTest;
 import org.apache.ignite.internal.processors.port.GridPortProcessorSelfTest;
 import org.apache.ignite.internal.util.GridStartupWithUndefinedIgniteHomeSelfTest;
 import org.apache.ignite.spi.communication.GridCacheMessageSelfTest;
-import org.apache.ignite.testframework.GridTestUtils;
 
-import java.util.Set;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Kernal self test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridGetOrStartSelfTest.class,
+    GridSameVmStartupSelfTest.class,
+    GridSpiExceptionSelfTest.class,
+    GridRuntimeExceptionSelfTest.class,
+    GridFailedInputParametersSelfTest.class,
+    GridNodeFilterSelfTest.class,
+    GridNodeVisorAttributesSelfTest.class,
+    GridDiscoverySelfTest.class,
+    GridCommunicationSelfTest.class,
+    GridEventStorageManagerSelfTest.class,
+    GridCommunicationSendMessageSelfTest.class,
+    GridCacheMessageSelfTest.class,
+    GridDeploymentManagerStopSelfTest.class,
+    GridManagerStopSelfTest.class,
+    GridDiscoveryManagerAttributesSelfTest.RegularDiscovery.class,
+    GridDiscoveryManagerAttributesSelfTest.ClientDiscovery.class,
+    GridDiscoveryManagerAliveCacheSelfTest.class,
+    GridDiscoveryEventSelfTest.class,
+    GridPortProcessorSelfTest.class,
+    GridHomePathSelfTest.class,
+    GridStartupWithUndefinedIgniteHomeSelfTest.class,
+    GridVersionSelfTest.class,
+    GridListenActorSelfTest.class,
+    GridNodeLocalSelfTest.class,
+    GridKernalConcurrentAccessStopSelfTest.class,
+    IgniteConcurrentEntryProcessorAccessStopTest.class,
+    GridUpdateNotifierSelfTest.class,
+    GridAddressResolverSelfTest.class,
+    IgniteUpdateNotifierPerClusterSettingSelfTest.class,
+    GridLocalEventListenerSelfTest.class,
+    IgniteTopologyPrintFormatSelfTest.class,
+    IgniteConnectionConcurrentReserveAndRemoveTest.class,
+    LongJVMPauseDetectorTest.class,
+    ClusterMetricsSelfTest.class,
+    DeploymentRequestOfUnknownClassProcessingTest.class,
+})
 public class IgniteKernalSelfTestSuite {
-    /**
-     * @return Kernal test suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Tests don't include in the execution.
-     * @return Test suite.
-     */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Kernal Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridGetOrStartSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSameVmStartupSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSpiExceptionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRuntimeExceptionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFailedInputParametersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNodeFilterSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNodeVisorAttributesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDiscoverySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCommunicationSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEventStorageManagerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCommunicationSendMessageSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheMessageSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDeploymentManagerStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridManagerStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDiscoveryManagerAttributesSelfTest.RegularDiscovery.class));
-        suite.addTest(new JUnit4TestAdapter(GridDiscoveryManagerAttributesSelfTest.ClientDiscovery.class));
-        suite.addTest(new JUnit4TestAdapter(GridDiscoveryManagerAliveCacheSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridDiscoveryEventSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridPortProcessorSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridHomePathSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridStartupWithUndefinedIgniteHomeSelfTest.class));
-        GridTestUtils.addTestIfNeeded(suite, GridVersionSelfTest.class, ignoredTests);
-        suite.addTest(new JUnit4TestAdapter(GridListenActorSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNodeLocalSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridKernalConcurrentAccessStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteConcurrentEntryProcessorAccessStopTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridUpdateNotifierSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAddressResolverSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteUpdateNotifierPerClusterSettingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLocalEventListenerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteTopologyPrintFormatSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteConnectionConcurrentReserveAndRemoveTest.class));
-        suite.addTest(new JUnit4TestAdapter(LongJVMPauseDetectorTest.class));
-        suite.addTest(new JUnit4TestAdapter(ClusterMetricsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(DeploymentRequestOfUnknownClassProcessingTest.class));
-
-        return suite;
-    }
 }
index 9bfdff0..5934cbf 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.util.future.GridCompoundFutureSelfTest;
 import org.apache.ignite.internal.util.future.GridEmbeddedFutureSelfTest;
 import org.apache.ignite.internal.util.future.GridFutureAdapterSelfTest;
@@ -47,53 +45,46 @@ import org.apache.ignite.lang.utils.IgniteOffheapReadWriteLockSelfTest;
 import org.apache.ignite.util.GridConcurrentLinkedDequeSelfTest;
 import org.apache.ignite.util.GridConcurrentLinkedHashMapMultiThreadedSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Ignite language test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteLangSelfTestSuite {
-    /**
-     * @return Kernal test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Lang Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridTupleSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridBoundedPriorityQueueSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridByteArrayListSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLeanMapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLeanIdentitySetSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridListSetSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSetWrapperSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridConcurrentWeakHashSetSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMetadataAwareAdapterSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSetWrapperSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteUuidSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridXSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridBoundedConcurrentOrderedMapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridBoundedConcurrentLinkedHashMapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedDequeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCircularBufferSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedHashMapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedHashMapMultiThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridStripedLockSelfTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridTupleSelfTest.class,
+    GridBoundedPriorityQueueSelfTest.class,
+    GridByteArrayListSelfTest.class,
+    GridLeanMapSelfTest.class,
+    GridLeanIdentitySetSelfTest.class,
+    GridListSetSelfTest.class,
+    GridSetWrapperSelfTest.class,
+    GridConcurrentWeakHashSetSelfTest.class,
+    GridMetadataAwareAdapterSelfTest.class,
+    GridSetWrapperSelfTest.class,
+    IgniteUuidSelfTest.class,
+    GridXSelfTest.class,
+    GridBoundedConcurrentOrderedMapSelfTest.class,
+    GridBoundedConcurrentLinkedHashMapSelfTest.class,
+    GridConcurrentLinkedDequeSelfTest.class,
+    GridCircularBufferSelfTest.class,
+    GridConcurrentLinkedHashMapSelfTest.class,
+    GridConcurrentLinkedHashMapMultiThreadedSelfTest.class,
+    GridStripedLockSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridFutureAdapterSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCompoundFutureSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridEmbeddedFutureSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNioFutureSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNioEmbeddedFutureSelfTest.class));
+    GridFutureAdapterSelfTest.class,
+    GridCompoundFutureSelfTest.class,
+    GridEmbeddedFutureSelfTest.class,
+    GridNioFutureSelfTest.class,
+    GridNioEmbeddedFutureSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteFutureImplTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteCacheFutureImplTest.class));
+    IgniteFutureImplTest.class,
+    IgniteCacheFutureImplTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteOffheapReadWriteLockSelfTest.class));
+    IgniteOffheapReadWriteLockSelfTest.class,
 
-        // Consistent hash tests.
-        suite.addTest(new JUnit4TestAdapter(GridConsistentHashSelfTest.class));
-
-        return suite;
-    }
+    // Consistent hash tests.
+    GridConsistentHashSelfTest.class,
+})
+public class IgniteLangSelfTestSuite {
 }
index 19038ea..e108f48 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.logger.java.JavaLoggerTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Logging self-test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({JavaLoggerTest.class})
 public class IgniteLoggingSelfTestSuite {
-    /**
-    * @return P2P tests suite.
-    */
-   public static TestSuite suite() {
-       TestSuite suite = new TestSuite("Ignite Logging Test Suite");
-
-       suite.addTest(new JUnit4TestAdapter(JavaLoggerTest.class));
-
-       return suite;
-   }
 }
index c8d1756..f7d6fa4 100644 (file)
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.direct.stream.v2.DirectByteBufferStreamImplV2ByteOrderSelfTest;
 import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerEnumSelfTest;
 import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerNodeFailoverTest;
@@ -31,45 +30,28 @@ import org.apache.ignite.internal.util.io.GridUnsafeDataInputOutputByteOrderSelf
 import org.apache.ignite.internal.util.io.GridUnsafeDataOutputArraySizingSelfTest;
 import org.apache.ignite.marshaller.MarshallerEnumDeadlockMultiJvmTest;
 import org.apache.ignite.marshaller.jdk.GridJdkMarshallerSelfTest;
-import org.apache.ignite.testframework.GridTestUtils;
 
-import java.util.Set;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test suite for all marshallers.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridUnsafeDataOutputArraySizingSelfTest.class,
+    GridJdkMarshallerSelfTest.class,
+    OptimizedMarshallerEnumSelfTest.class,
+    OptimizedMarshallerSelfTest.class,
+    OptimizedMarshallerTest.class,
+    OptimizedObjectStreamSelfTest.class,
+    GridUnsafeDataInputOutputByteOrderSelfTest.class,
+    OptimizedMarshallerNodeFailoverTest.class,
+    OptimizedMarshallerSerialPersistentFieldsSelfTest.class,
+    DirectByteBufferStreamImplV2ByteOrderSelfTest.class,
+    GridHandleTableSelfTest.class,
+    OptimizedMarshallerPooledSelfTest.class,
+    MarshallerEnumDeadlockMultiJvmTest.class
+})
 public class IgniteMarshallerSelfTestSuite {
-    /**
-     * @return Kernal test suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Ignored tests.
-     * @return Test suite.
-     */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Marshaller Test Suite");
-
-        GridTestUtils.addTestIfNeeded(suite, GridUnsafeDataOutputArraySizingSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridJdkMarshallerSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerEnumSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedObjectStreamSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridUnsafeDataInputOutputByteOrderSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerNodeFailoverTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerSerialPersistentFieldsSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, DirectByteBufferStreamImplV2ByteOrderSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridHandleTableSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerPooledSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, MarshallerEnumDeadlockMultiJvmTest.class, ignoredTests);
-
-        return suite;
-    }
 }
index 09e49a8..85010c9 100644 (file)
@@ -17,9 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.managers.deployment.GridDeploymentMessageCountSelfTest;
 import org.apache.ignite.p2p.DeploymentClassLoaderCallableTest;
 import org.apache.ignite.p2p.GridP2PClassLoadingSelfTest;
@@ -39,50 +36,34 @@ import org.apache.ignite.p2p.GridP2PUndeploySelfTest;
 import org.apache.ignite.p2p.P2PScanQueryUndeployTest;
 import org.apache.ignite.p2p.P2PStreamingClassLoaderTest;
 import org.apache.ignite.p2p.SharedDeploymentTest;
-import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * P2P test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridP2PDoubleDeploymentSelfTest.class,
+    GridP2PHotRedeploymentSelfTest.class,
+    GridP2PClassLoadingSelfTest.class,
+    GridP2PUndeploySelfTest.class,
+    GridP2PRemoteClassLoadersSelfTest.class,
+    GridP2PNodeLeftSelfTest.class,
+    GridP2PDifferentClassLoaderSelfTest.class,
+    GridP2PSameClassLoaderSelfTest.class,
+    GridP2PJobClassLoaderSelfTest.class,
+    GridP2PRecursionTaskSelfTest.class,
+    GridP2PLocalDeploymentSelfTest.class,
+    //GridP2PTestTaskExecutionTest.class,
+    GridP2PTimeoutSelfTest.class,
+    GridP2PMissedResourceCacheSizeSelfTest.class,
+    GridP2PContinuousDeploymentSelfTest.class,
+    DeploymentClassLoaderCallableTest.class,
+    P2PStreamingClassLoaderTest.class,
+    SharedDeploymentTest.class,
+    P2PScanQueryUndeployTest.class,
+    GridDeploymentMessageCountSelfTest.class,
+})
 public class IgniteP2PSelfTestSuite {
-    /**
-     * @return Suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @return P2P tests suite.
-     */
-    @SuppressWarnings({"ProhibitedExceptionDeclared"})
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite P2P Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridP2PDoubleDeploymentSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PHotRedeploymentSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PClassLoadingSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PUndeploySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PRemoteClassLoadersSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PNodeLeftSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PDifferentClassLoaderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PSameClassLoaderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PJobClassLoaderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PRecursionTaskSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PLocalDeploymentSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridP2PTestTaskExecutionTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PTimeoutSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PMissedResourceCacheSizeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridP2PContinuousDeploymentSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(DeploymentClassLoaderCallableTest.class));
-        suite.addTest(new JUnit4TestAdapter(P2PStreamingClassLoaderTest.class));
-        suite.addTest(new JUnit4TestAdapter(SharedDeploymentTest.class));
-        suite.addTest(new JUnit4TestAdapter(P2PScanQueryUndeployTest.class));
-        GridTestUtils.addTestIfNeeded(suite, GridDeploymentMessageCountSelfTest.class, ignoredTests);
-
-        return suite;
-    }
 }
index f92cab1..9045f36 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
-import junit.framework.TestSuite;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheConfigurationFileConsistencyCheckTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest;
@@ -41,21 +42,20 @@ import org.apache.ignite.internal.processors.cache.persistence.pagemem.PagesWrit
 import org.apache.ignite.internal.processors.cache.persistence.wal.SegmentedRingByteBufferTest;
 import org.apache.ignite.internal.processors.cache.persistence.wal.aware.SegmentAwareTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsMvccTestSuite.DynamicSuite.class)
 public class IgnitePdsMvccTestSuite {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
-        TestSuite suite = new TestSuite("Ignite Persistent Store Mvcc Test Suite");
-
         Set<Class> ignoredTests = new HashSet<>();
 
         // Skip classes that already contains Mvcc tests.
@@ -86,8 +86,14 @@ public class IgnitePdsMvccTestSuite {
         ignoredTests.add(IgnitePdsDestroyCacheTest.class);
         ignoredTests.add(IgnitePdsDestroyCacheWithoutCheckpointsTest.class);
 
-        suite.addTest(IgnitePdsTestSuite.suite(ignoredTests));
+        return new ArrayList<>(IgnitePdsTestSuite.suite(ignoredTests));
+    }
 
-        return suite;
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
     }
 }
index 429bd0f..09f6ff1 100644 (file)
@@ -19,7 +19,7 @@ package org.apache.ignite.testsuites;
 
 import java.util.Collection;
 import java.util.HashSet;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteDataStorageMetricsSelfTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsExchangeDuringCheckpointTest;
@@ -46,21 +46,20 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.crc.Ignite
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.crc.IgniteStandaloneWalIteratorInvalidCrcTest;
 import org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneWalRecordsIteratorTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsMvccTestSuite2.DynamicSuite.class)
 public class IgnitePdsMvccTestSuite2 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
-        TestSuite suite = new TestSuite("Ignite persistent Store Mvcc Test Suite 2");
-
         Collection<Class> ignoredTests = new HashSet<>();
 
         // Classes that are contained mvcc test already.
@@ -95,8 +94,14 @@ public class IgnitePdsMvccTestSuite2 {
         ignoredTests.add(WalRolloverTypesTest.class);
         ignoredTests.add(FsyncWalRolloverDoesNotBlockTest.class);
 
-        suite.addTest(IgnitePdsTestSuite2.suite(ignoredTests));
+        return IgnitePdsTestSuite2.suite(ignoredTests);
+    }
 
-        return suite;
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
     }
 }
index 2168bc7..26dffc1 100644 (file)
 package org.apache.ignite.testsuites;
 
 import java.util.HashSet;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.IgniteSystemProperties;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Mvcc version of {@link IgnitePdsTestSuite3}.
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsMvccTestSuite3.DynamicSuite.class)
 public class IgnitePdsMvccTestSuite3 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
-        TestSuite suite = new TestSuite("Ignite Persistent Store Mvcc Test Suite 3");
-
         HashSet<Class> ignoredTests = new HashSet<>();
 
         // No ignored tests yet.
 
-        suite.addTest(IgnitePdsTestSuite3.suite(ignoredTests));
+        return IgnitePdsTestSuite3.suite(ignoredTests);
+    }
 
-        return suite;
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
     }
 }
index 648ca42..2b20c41 100644 (file)
 package org.apache.ignite.testsuites;
 
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
-import junit.framework.TestSuite;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsTaskCancelingTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsPartitionPreloadTest;
 import org.apache.ignite.internal.processors.cache.persistence.file.FileDownloaderTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Mvcc variant of {@link IgnitePdsTestSuite4}.
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsMvccTestSuite4.DynamicSuite.class)
 public class IgnitePdsMvccTestSuite4 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
 
-        TestSuite suite = new TestSuite("Ignite persistent Store Mvcc Test Suite 4");
-
         Set<Class> ignoredTests = new HashSet<>();
 
         // Skip classes that already contains Mvcc tests
@@ -48,9 +47,14 @@ public class IgnitePdsMvccTestSuite4 {
         ignoredTests.add(FileDownloaderTest.class);
         ignoredTests.add(IgnitePdsTaskCancelingTest.class);
 
-        suite.addTest(IgnitePdsTestSuite4.suite(ignoredTests));
-
-        return suite;
+        return IgnitePdsTestSuite4.suite(ignoredTests);
     }
 
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 443d126..7fba2d1 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistence;
 import org.apache.ignite.internal.processors.cache.IgnitePdsDataRegionMetricsTxTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheConfigurationFileConsistencyCheckTest;
@@ -54,26 +55,27 @@ import org.apache.ignite.internal.processors.database.IgniteDbSingleNodePutGetTe
 import org.apache.ignite.internal.processors.database.IgniteDbSingleNodeTinyPutGetTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsTestSuite.DynamicSuite.class)
 public class IgnitePdsTestSuite {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         addRealPageStoreTests(suite, ignoredTests);
         addRealPageStoreTestsLongRunning(suite, ignoredTests);
@@ -119,7 +121,7 @@ public class IgnitePdsTestSuite {
      * @param suite suite to add tests into.
      * @param ignoredTests Ignored tests.
      */
-    private static void addRealPageStoreTestsLongRunning(TestSuite suite, Collection<Class> ignoredTests) {
+    private static void addRealPageStoreTestsLongRunning(List<Class<?>> suite, Collection<Class> ignoredTests) {
         // Basic PageMemory tests.
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsPageReplacementTest.class, ignoredTests);
     }
@@ -132,7 +134,7 @@ public class IgnitePdsTestSuite {
      * @param suite suite to add tests into.
      * @param ignoredTests Ignored tests.
      */
-    public static void addRealPageStoreTests(TestSuite suite, Collection<Class> ignoredTests) {
+    public static void addRealPageStoreTests(List<Class<?>> suite, Collection<Class> ignoredTests) {
 
         // Checkpointing smoke-test.
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsCheckpointSimulationWithRealCpDisabledTest.class, ignoredTests);
@@ -169,4 +171,12 @@ public class IgnitePdsTestSuite {
         //MetaStorage
         GridTestUtils.addTestIfNeeded(suite, IgniteMetaStorageBasicTest.class, ignoredTests);
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 0ff700c..767ea94 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteDataStorageMetricsSelfTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheStartStopWithFreqCheckpointTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCorruptedStoreTest;
@@ -72,26 +73,27 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.reader.Ign
 import org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneWalRecordsIteratorTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsTestSuite2.DynamicSuite.class)
 public class IgnitePdsTestSuite2 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return Suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite persistent Store Test Suite 2");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         // Integrity test.
         GridTestUtils.addTestIfNeeded(suite, IgniteDataIntegrityTests.class, ignoredTests);
@@ -121,7 +123,7 @@ public class IgnitePdsTestSuite2 {
      * @param suite suite to add tests into.
      * @param ignoredTests Ignored tests.
      */
-    private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite, Collection<Class> ignoredTests) {
+    private static void addRealPageStoreTestsNotForDirectIo(List<Class<?>> suite, Collection<Class> ignoredTests) {
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsPartitionFilesDestroyTest.class, ignoredTests);
 
         GridTestUtils.addTestIfNeeded(suite, LocalWalModeChangeDuringRebalancingSelfTest.class, ignoredTests);
@@ -145,7 +147,7 @@ public class IgnitePdsTestSuite2 {
      * @param suite suite to add tests into.
      * @param ignoredTests Ignored tests.
      */
-    public static void addRealPageStoreTests(TestSuite suite, Collection<Class> ignoredTests) {
+    public static void addRealPageStoreTests(List<Class<?>> suite, Collection<Class> ignoredTests) {
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsPageSizesTest.class, ignoredTests);
 
         // Metrics test.
@@ -218,4 +220,12 @@ public class IgnitePdsTestSuite2 {
 
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsPartitionsStateRecoveryTest.class, ignoredTests);
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 82c482e..920ce77 100644 (file)
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithExpiryPolicy;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsTestSuite3.DynamicSuite.class)
 public class IgnitePdsTestSuite3 extends TestSuite {
     /**
      * @return IgniteCache test suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return IgniteCache test suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Mvcc Test Suite 3");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         addRealPageStoreTestsNotForDirectIo(suite, ignoredTests);
 
@@ -55,9 +58,17 @@ public class IgnitePdsTestSuite3 extends TestSuite {
      * @param suite suite to add tests into.
      * @param ignoredTests Ignored tests list.`
      */
-    private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite, Collection<Class> ignoredTests) {
+    private static void addRealPageStoreTestsNotForDirectIo(List<Class<?>> suite, Collection<Class> ignoredTests) {
         // Rebalancing test
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsContinuousRestartTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsContinuousRestartTestWithExpiryPolicy.class, ignoredTests);
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index d38c34a..5ff6d6a 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.cache.ResetLostPartitionTest;
 import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse;
 import org.apache.ignite.internal.processors.cache.distributed.CachePageWriteLockUnlockTest;
@@ -33,26 +34,27 @@ import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsTrans
 import org.apache.ignite.internal.processors.cache.persistence.file.FileDownloaderTest;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  *
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsTestSuite4.DynamicSuite.class)
 public class IgnitePdsTestSuite4 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
+    public static List<Class<?>> suite() {
         return suite(null);
     }
 
     /**
-     * @param ignoredTests Ignored tests.
-     * @return Suite.
+     * @param ignoredTests Tests to ignore.
+     * @return Test suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite 4");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         addRealPageStoreTestsNotForDirectIo(suite, ignoredTests);
 
@@ -74,7 +76,7 @@ public class IgnitePdsTestSuite4 {
      * @param suite suite to add tests into.
      * @param ignoredTests Ignored tests.
      */
-    private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite, Collection<Class> ignoredTests) {
+    private static void addRealPageStoreTestsNotForDirectIo(List<Class<?>> suite, Collection<Class> ignoredTests) {
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsTransactionsHangTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsPageEvictionDuringPartitionClearTest.class, ignoredTests);
 
@@ -84,4 +86,12 @@ public class IgnitePdsTestSuite4 {
         // Integrity test.
         GridTestUtils.addTestIfNeeded(suite, IgnitePdsRecoveryAfterFileCorruptionTest.class, ignoredTests);
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 75a8587..3bfb5b5 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.platform.PlatformDefaultJavaObjectFactorySelfTest;
 import org.apache.ignite.platform.PlatformJavaObjectFactoryProxySelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Suite for platform tests.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    PlatformDefaultJavaObjectFactorySelfTest.class,
+    PlatformJavaObjectFactoryProxySelfTest.class,
+})
 public class IgnitePlatformsTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Deployment SPI Test Suite");
-
-        // LocalDeploymentSpi tests
-        suite.addTest(new JUnit4TestAdapter(PlatformDefaultJavaObjectFactorySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(PlatformJavaObjectFactoryProxySelfTest.class));
-
-        return suite;
-    }
 }
index e5ea8d5..277f0cc 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheAtomicCommandHandlerSelfTest;
 import org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandlerSelfTest;
 import org.apache.ignite.internal.processors.rest.handlers.log.GridLogCommandHandlerTest;
 import org.apache.ignite.internal.processors.rest.handlers.query.GridQueryCommandHandlerTest;
 import org.apache.ignite.internal.processors.rest.handlers.top.CacheTopologyCommandHandlerTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * REST support tests.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridCacheCommandHandlerSelfTest.class,
+    GridCacheAtomicCommandHandlerSelfTest.class,
+    GridLogCommandHandlerTest.class,
+    GridQueryCommandHandlerTest.class,
+    CacheTopologyCommandHandlerTest.class
+})
 public class IgniteRestHandlerTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("REST Support Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridCacheCommandHandlerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheAtomicCommandHandlerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLogCommandHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridQueryCommandHandlerTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheTopologyCommandHandlerTest.class));
-
-        return suite;
-    }
 }
index 404ffc1..bbed57d 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.checkpoint.cache.CacheCheckpointSpiConfigSelfTest;
 import org.apache.ignite.spi.checkpoint.cache.CacheCheckpointSpiSecondCacheSelfTest;
 import org.apache.ignite.spi.checkpoint.cache.CacheCheckpointSpiSelfTest;
@@ -32,38 +30,30 @@ import org.apache.ignite.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpiMultip
 import org.apache.ignite.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpiSelfTest;
 import org.apache.ignite.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpiStartStopSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Grid SPI checkpoint self test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteSpiCheckpointSelfTestSuite {
-    /**
-     * @return Checkpoint test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Checkpoint Test Suite");
-
-        // Cache.
-        suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiConfigSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiSecondCacheSelfTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    CacheCheckpointSpiConfigSelfTest.class,
+    CacheCheckpointSpiSelfTest.class,
+    CacheCheckpointSpiStartStopSelfTest.class,
+    CacheCheckpointSpiSecondCacheSelfTest.class,
 
-        // JDBC.
-        suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiConfigSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiCustomConfigSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiDefaultConfigSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiStartStopSelfTest.class));
+    // JDBC.
+    JdbcCheckpointSpiConfigSelfTest.class,
+    JdbcCheckpointSpiCustomConfigSelfTest.class,
+    JdbcCheckpointSpiDefaultConfigSelfTest.class,
+    JdbcCheckpointSpiStartStopSelfTest.class,
 
-        // Shared FS.
-        suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiConfigSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiMultiThreadedSelfTest.class));
-
-        return suite;
-    }
+    // Shared FS.
+    GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.class,
+    GridSharedFsCheckpointSpiSelfTest.class,
+    GridSharedFsCheckpointSpiStartStopSelfTest.class,
+    GridSharedFsCheckpointSpiConfigSelfTest.class,
+    //GridSharedFsCheckpointSpiMultiThreadedSelfTest.class,
+})
+public class IgniteSpiCheckpointSelfTestSuite {
 }
index 8df78ee..d686546 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.collision.fifoqueue.GridFifoQueueCollisionSpiConfigSelfTest;
 import org.apache.ignite.spi.collision.fifoqueue.GridFifoQueueCollisionSpiSelfTest;
 import org.apache.ignite.spi.collision.fifoqueue.GridFifoQueueCollisionSpiStartStopSelfTest;
@@ -31,36 +29,28 @@ import org.apache.ignite.spi.collision.priorityqueue.GridPriorityQueueCollisionS
 import org.apache.ignite.spi.collision.priorityqueue.GridPriorityQueueCollisionSpiSelfTest;
 import org.apache.ignite.spi.collision.priorityqueue.GridPriorityQueueCollisionSpiStartStopSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Collision SPI self-test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteSpiCollisionSelfTestSuite {
-    /**
-     * @return Failover SPI tests suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Collision SPI Test Suite");
-
-        // Priority.
-        suite.addTest(new JUnit4TestAdapter(GridPriorityQueueCollisionSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridPriorityQueueCollisionSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridPriorityQueueCollisionSpiConfigSelfTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridPriorityQueueCollisionSpiSelfTest.class,
+    GridPriorityQueueCollisionSpiStartStopSelfTest.class,
+    GridPriorityQueueCollisionSpiConfigSelfTest.class,
 
-        // FIFO.
-        suite.addTest(new JUnit4TestAdapter(GridFifoQueueCollisionSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFifoQueueCollisionSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridFifoQueueCollisionSpiConfigSelfTest.class));
+    // FIFO.
+    GridFifoQueueCollisionSpiSelfTest.class,
+    GridFifoQueueCollisionSpiStartStopSelfTest.class,
+    GridFifoQueueCollisionSpiConfigSelfTest.class,
 
-        // Job Stealing.
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiAttributesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiCustomTopologySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiConfigSelfTest.class));
-
-        return suite;
-    }
+    // Job Stealing.
+    GridJobStealingCollisionSpiSelfTest.class,
+    GridJobStealingCollisionSpiAttributesSelfTest.class,
+    GridJobStealingCollisionSpiCustomTopologySelfTest.class,
+    GridJobStealingCollisionSpiStartStopSelfTest.class,
+    GridJobStealingCollisionSpiConfigSelfTest.class
+})
+public class IgniteSpiCollisionSelfTestSuite {
 }
index a7010c0..64a3590 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.communication.tcp.GridTcpCommunicationSpiConcurrentConnectSelfTest;
 import org.apache.ignite.spi.communication.tcp.GridTcpCommunicationSpiConcurrentConnectSslSelfTest;
 import org.apache.ignite.spi.communication.tcp.GridTcpCommunicationSpiConfigSelfTest;
@@ -46,59 +44,52 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpiHalfOpenedConn
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpiSkipMessageSendTest;
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationStatisticsTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test suite for all communication SPIs.
  */
-@RunWith(AllTests.class)
-public class IgniteSpiCommunicationSelfTestSuite {
-    /**
-     * @return Communication SPI tests suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Communication SPI Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryAckSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationRecoveryAckClosureSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoverySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryNoPairedConnectionsTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoverySslSelfTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridTcpCommunicationSpiRecoveryAckSelfTest.class,
+    IgniteTcpCommunicationRecoveryAckClosureSelfTest.class,
+    GridTcpCommunicationSpiRecoverySelfTest.class,
+    GridTcpCommunicationSpiRecoveryNoPairedConnectionsTest.class,
+    GridTcpCommunicationSpiRecoverySslSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiConcurrentConnectSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiConcurrentConnectSslSelfTest.class));
+    GridTcpCommunicationSpiConcurrentConnectSelfTest.class,
+    GridTcpCommunicationSpiConcurrentConnectSslSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiSslSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiSslSmallBuffersSelfTest.class));
+    GridTcpCommunicationSpiSslSelfTest.class,
+    GridTcpCommunicationSpiSslSmallBuffersSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiTcpSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiTcpNoDelayOffSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiShmemSelfTest.class));
+    GridTcpCommunicationSpiTcpSelfTest.class,
+    GridTcpCommunicationSpiTcpNoDelayOffSelfTest.class,
+    GridTcpCommunicationSpiShmemSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiStartStopSelfTest.class));
+    GridTcpCommunicationSpiStartStopSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiMultithreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiMultithreadedShmemTest.class));
+    GridTcpCommunicationSpiMultithreadedSelfTest.class,
+    GridTcpCommunicationSpiMultithreadedShmemTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiTcpFailureDetectionSelfTest.class));
+    GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.class,
+    GridTcpCommunicationSpiTcpFailureDetectionSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiConfigSelfTest.class));
+    GridTcpCommunicationSpiConfigSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiSkipMessageSendTest.class));
+    TcpCommunicationSpiSkipMessageSendTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiFaultyClientTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiDropNodesTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiHalfOpenedConnectionTest.class));
+    TcpCommunicationSpiFaultyClientTest.class,
+    TcpCommunicationSpiDropNodesTest.class,
+    TcpCommunicationSpiHalfOpenedConnectionTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(TcpCommunicationStatisticsTest.class));
+    TcpCommunicationStatisticsTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationHandshakeWaitTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationHandshakeWaitSslTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationConnectOnInitTest.class));
+    IgniteTcpCommunicationHandshakeWaitTest.class,
+    IgniteTcpCommunicationHandshakeWaitSslTest.class,
+    IgniteTcpCommunicationConnectOnInitTest.class,
 
-        //suite.addTest(new JUnit4TestAdapter(GridCacheDhtLockBackupSelfTest.class));
-
-        return suite;
-    }
+    //GridCacheDhtLockBackupSelfTest.class,
+})
+public class IgniteSpiCommunicationSelfTestSuite {
 }
index 6fce539..5218686 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.deployment.local.GridLocalDeploymentSpiSelfTest;
 import org.apache.ignite.spi.deployment.local.GridLocalDeploymentSpiStartStopSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test suit for deployment SPIs.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridLocalDeploymentSpiSelfTest.class,
+    GridLocalDeploymentSpiStartStopSelfTest.class
+})
 public class IgniteSpiDeploymentSelfTestSuite {
-    /**
-     * @return Deployment SPI tests suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Deployment SPI Test Suite");
-
-        // LocalDeploymentSpi tests
-        suite.addTest(new JUnit4TestAdapter(GridLocalDeploymentSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLocalDeploymentSpiStartStopSelfTest.class));
-
-        return suite;
-    }
 }
index e9f656b..7da76e7 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.IgniteDiscoveryMassiveNodeFailTest;
 import org.apache.ignite.spi.GridTcpSpiForwardingSelfTest;
 import org.apache.ignite.spi.discovery.AuthenticationRestartTest;
@@ -63,93 +61,89 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMultic
 import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinderSelfTest;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinderSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP;
 
 /**
  * Test suite for all discovery spi implementations.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    TcpDiscoveryVmIpFinderSelfTest.class,
+    TcpDiscoverySharedFsIpFinderSelfTest.class,
+    TcpDiscoveryJdbcIpFinderSelfTest.class,
+    TcpDiscoveryMulticastIpFinderSelfTest.class,
+    TcpDiscoveryIpFinderCleanerTest.class,
+
+    TcpDiscoverySelfTest.class,
+    TcpDiscoverySpiSelfTest.class,
+    //TcpDiscoverySpiRandomStartStopTest.class,
+    //TcpDiscoverySpiSslSelfTest.class,
+    //TcpDiscoverySpiWildcardSelfTest.class,
+    TcpDiscoverySpiFailureTimeoutSelfTest.class,
+    TcpDiscoverySpiMBeanTest.class,
+    TcpDiscoverySpiStartStopSelfTest.class,
+    TcpDiscoverySpiConfigSelfTest.class,
+    TcpDiscoveryMarshallerCheckSelfTest.class,
+    TcpDiscoverySnapshotHistoryTest.class,
+
+    GridTcpSpiForwardingSelfTest.class,
+
+    TcpClientDiscoverySpiSelfTest.class,
+    LongClientConnectToClusterTest.class,
+    TcpClientDiscoveryMarshallerCheckSelfTest.class,
+    TcpClientDiscoverySpiCoordinatorChangeTest.class,
+    TcpClientDiscoverySpiMulticastTest.class,
+    TcpClientDiscoverySpiFailureTimeoutSelfTest.class,
+    TcpClientDiscoveryUnresolvedHostTest.class,
+
+    TcpDiscoveryNodeConsistentIdSelfTest.class,
+    TcpDiscoveryNodeConfigConsistentIdSelfTest.class,
+
+    TcpDiscoveryRestartTest.class,
+    TcpDiscoveryMultiThreadedTest.class,
+    //TcpDiscoveryConcurrentStartTest.class,
+
+    TcpDiscoverySegmentationPolicyTest.class,
+
+    TcpDiscoveryNodeAttributesUpdateOnReconnectTest.class,
+    AuthenticationRestartTest.class,
+
+    TcpDiscoveryWithWrongServerTest.class,
+
+    TcpDiscoverySpiReconnectDelayTest.class,
+
+    IgniteDiscoveryMassiveNodeFailTest.class,
+
+    // Client connect.
+    IgniteClientConnectTest.class,
+    IgniteClientReconnectMassiveShutdownTest.class,
+    TcpDiscoveryClientSuspensionSelfTest.class,
+
+    // SSL.
+    TcpDiscoverySslSelfTest.class,
+    TcpDiscoverySslTrustedSelfTest.class,
+    TcpDiscoverySslSecuredUnsecuredTest.class,
+    TcpDiscoverySslTrustedUntrustedTest.class,
+    TcpDiscoverySslParametersTest.class,
+
+    // Disco cache reuse.
+    IgniteDiscoveryCacheReuseSelfTest.class,
+
+    DiscoveryUnmarshalVulnerabilityTest.class,
+
+    FilterDataForClientNodeDiscoveryTest.class,
+
+    TcpDiscoveryPendingMessageDeliveryTest.class
+})
 public class IgniteSpiDiscoverySelfTestSuite {
-    /**
-     * @return Discovery SPI tests suite.
-     */
-    public static TestSuite suite() {
+    /** */
+    @BeforeClass
+    public static void init() {
         System.setProperty(IGNITE_OVERRIDE_MCAST_GRP,
             GridTestUtils.getNextMulticastGroup(IgniteSpiDiscoverySelfTestSuite.class));
-
-        TestSuite suite = new TestSuite("Ignite Discovery SPI Test Suite");
-
-        // Tcp.
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryVmIpFinderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySharedFsIpFinderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryJdbcIpFinderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryMulticastIpFinderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryIpFinderCleanerTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiRandomStartStopTest.class));
-        //suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiSslSelfTest.class));
-        //suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiWildcardSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiFailureTimeoutSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiMBeanTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiConfigSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryMarshallerCheckSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySnapshotHistoryTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(GridTcpSpiForwardingSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(LongClientConnectToClusterTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpClientDiscoveryMarshallerCheckSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiCoordinatorChangeTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiMulticastTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiFailureTimeoutSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpClientDiscoveryUnresolvedHostTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryNodeConsistentIdSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryNodeConfigConsistentIdSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryRestartTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryMultiThreadedTest.class));
-        //suite.addTest(new JUnit4TestAdapter(TcpDiscoveryConcurrentStartTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySegmentationPolicyTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryNodeAttributesUpdateOnReconnectTest.class));
-        suite.addTest(new JUnit4TestAdapter(AuthenticationRestartTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryWithWrongServerTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiReconnectDelayTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(IgniteDiscoveryMassiveNodeFailTest.class));
-
-        // Client connect.
-        suite.addTest(new JUnit4TestAdapter(IgniteClientConnectTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectMassiveShutdownTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryClientSuspensionSelfTest.class));
-
-        // SSL.
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslTrustedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslSecuredUnsecuredTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslTrustedUntrustedTest.class));
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslParametersTest.class));
-
-        // Disco cache reuse.
-        suite.addTest(new JUnit4TestAdapter(IgniteDiscoveryCacheReuseSelfTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(DiscoveryUnmarshalVulnerabilityTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(FilterDataForClientNodeDiscoveryTest.class));
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryPendingMessageDeliveryTest.class));
-
-        return suite;
     }
 }
index b9917d6..e03444a 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageMultiThreadedSelfTest;
 import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiConfigSelfTest;
 import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiSelfTest;
 import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiStartStopSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Event storage test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridMemoryEventStorageSpiSelfTest.class,
+    GridMemoryEventStorageSpiStartStopSelfTest.class,
+    GridMemoryEventStorageMultiThreadedSelfTest.class,
+    GridMemoryEventStorageSpiConfigSelfTest.class
+})
 public class IgniteSpiEventStorageSelfTestSuite {
-    /**
-     * @return Event storage test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Event Storage Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageMultiThreadedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiConfigSelfTest.class));
-
-        return suite;
-    }
 }
index 933a2bc..29bfa00 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.failover.always.GridAlwaysFailoverSpiConfigSelfTest;
 import org.apache.ignite.spi.failover.always.GridAlwaysFailoverSpiSelfTest;
 import org.apache.ignite.spi.failover.always.GridAlwaysFailoverSpiStartStopSelfTest;
@@ -29,34 +27,26 @@ import org.apache.ignite.spi.failover.jobstealing.GridJobStealingFailoverSpiStar
 import org.apache.ignite.spi.failover.never.GridNeverFailoverSpiSelfTest;
 import org.apache.ignite.spi.failover.never.GridNeverFailoverSpiStartStopSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Failover SPI self-test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteSpiFailoverSelfTestSuite {
-    /**
-     * @return Failover SPI tests suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Failover SPI Test Suite");
-
-        // Always failover.
-        suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiConfigSelfTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridAlwaysFailoverSpiSelfTest.class,
+    GridAlwaysFailoverSpiStartStopSelfTest.class,
+    GridAlwaysFailoverSpiConfigSelfTest.class,
 
-        // Never failover.
-        suite.addTest(new JUnit4TestAdapter(GridNeverFailoverSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridNeverFailoverSpiStartStopSelfTest.class));
+    // Never failover.
+    GridNeverFailoverSpiSelfTest.class,
+    GridNeverFailoverSpiStartStopSelfTest.class,
 
-        // Job stealing failover.
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiOneNodeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiConfigSelfTest.class));
-
-        return suite;
-    }
+    // Job stealing failover.
+    GridJobStealingFailoverSpiSelfTest.class,
+    GridJobStealingFailoverSpiOneNodeSelfTest.class,
+    GridJobStealingFailoverSpiStartStopSelfTest.class,
+    GridJobStealingFailoverSpiConfigSelfTest.class
+})
+public class IgniteSpiFailoverSelfTestSuite {
 }
index e5bdfef..4c9596c 100644 (file)
@@ -17,9 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiConfigSelfTest;
 import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest;
 import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiSelfTest;
@@ -36,49 +33,34 @@ import org.apache.ignite.spi.loadbalancing.weightedrandom.GridWeightedRandomLoad
 import org.apache.ignite.spi.loadbalancing.weightedrandom.GridWeightedRandomLoadBalancingSpiStartStopSelfTest;
 import org.apache.ignite.spi.loadbalancing.weightedrandom.GridWeightedRandomLoadBalancingSpiWeightedSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Load balancing SPI self-test suite.
  */
-@RunWith(AllTests.class)
-public final class IgniteSpiLoadBalancingSelfTestSuite {
-    /**
-     * Enforces singleton.
-     */
-    private IgniteSpiLoadBalancingSelfTestSuite() {
-        // No-op.
-    }
-
-    /**
-     * @return Test suite.
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite("Ignite Load Balancing Test Suite");
-
-        // Random.
-        suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiWeightedSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiConfigSelfTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridWeightedRandomLoadBalancingSpiSelfTest.class,
+    GridWeightedRandomLoadBalancingSpiWeightedSelfTest.class,
+    GridWeightedRandomLoadBalancingSpiStartStopSelfTest.class,
+    GridWeightedRandomLoadBalancingSpiConfigSelfTest.class,
 
-        // Round-robin.
-        suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.class));
+    // Round-robin.
+    GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.class,
+    GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.class,
+    GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.class,
+    GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.class,
+    GridRoundRobinLoadBalancingSpiStartStopSelfTest.class,
+    GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.class,
 
-        // Adaptive.
-        suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiStartStopSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiConfigSelfTest.class));
+    // Adaptive.
+    GridAdaptiveLoadBalancingSpiSelfTest.class,
+    GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.class,
+    GridAdaptiveLoadBalancingSpiStartStopSelfTest.class,
+    GridAdaptiveLoadBalancingSpiConfigSelfTest.class,
 
-        // Load balancing for internal tasks.
-        suite.addTest(new JUnit4TestAdapter(GridInternalTasksLoadBalancingSelfTest.class));
-
-        return suite;
-    }
+    // Load balancing for internal tasks.
+    GridInternalTasksLoadBalancingSelfTest.class
+})
+public final class IgniteSpiLoadBalancingSelfTestSuite {
 }
index c98cbf1..8a7f0da 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.managers.GridManagerLocalMessageListenerSelfTest;
 import org.apache.ignite.internal.managers.GridNoopManagerSelfTest;
 import org.apache.ignite.spi.encryption.KeystoreEncryptionSpiSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Grid SPI test suite.
  */
-@RunWith(AllTests.class)
-public class IgniteSpiTestSuite {
-    /**
-     * @return All SPI tests suite.
-     * @throws Exception If failed.
-     */
-    public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Ignite SPIs Test Suite");
-
-        // Failover.
-        suite.addTest(IgniteSpiFailoverSelfTestSuite.suite());
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    // Failover.
+    IgniteSpiFailoverSelfTestSuite.class,
 
-        // Collision.
-        suite.addTest(IgniteSpiCollisionSelfTestSuite.suite());
+    // Collision.
+    IgniteSpiCollisionSelfTestSuite.class,
 
-        // Event storage.
-        suite.addTest(IgniteSpiEventStorageSelfTestSuite.suite());
+    // Event storage.
+    IgniteSpiEventStorageSelfTestSuite.class,
 
-        // Load Balancing.
-        suite.addTest(IgniteSpiLoadBalancingSelfTestSuite.suite());
+    // Load Balancing.
+    IgniteSpiLoadBalancingSelfTestSuite.class,
 
-        // Checkpoints.
-        suite.addTest(IgniteSpiCheckpointSelfTestSuite.suite());
+    // Checkpoints.
+    IgniteSpiCheckpointSelfTestSuite.class,
 
-        // Deployment
-        suite.addTest(IgniteSpiDeploymentSelfTestSuite.suite());
+    // Deployment
+    IgniteSpiDeploymentSelfTestSuite.class,
 
-        // Discovery.
-        suite.addTest(IgniteSpiDiscoverySelfTestSuite.suite());
+    // Discovery.
+    IgniteSpiDiscoverySelfTestSuite.class,
 
-        // Communication.
-        suite.addTest(IgniteSpiCommunicationSelfTestSuite.suite());
+    // Communication.
+    IgniteSpiCommunicationSelfTestSuite.class,
 
-        // All other tests.
-        suite.addTest(new JUnit4TestAdapter(GridNoopManagerSelfTest.class));
+    // All other tests.
+    GridNoopManagerSelfTest.class,
 
-        // Local Message Listener tests.
-        suite.addTest(new JUnit4TestAdapter(GridManagerLocalMessageListenerSelfTest.class));
+    // Local Message Listener tests.
+    GridManagerLocalMessageListenerSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(KeystoreEncryptionSpiSelfTest.class));
-
-        return suite;
-    }
+    KeystoreEncryptionSpiSelfTest.class
+})
+public class IgniteSpiTestSuite {
 }
index 8cdc6df..46889a8 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheBaselineTopologyTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteBaselineAffinityTopologyActivationTest;
@@ -37,48 +35,41 @@ import org.apache.ignite.internal.processors.cache.persistence.standbycluster.jo
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.reconnect.IgniteStandByClientReconnectTest;
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.reconnect.IgniteStandByClientReconnectToNewClusterTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  *
  */
-@RunWith(AllTests.class)
-public class IgniteStandByClusterSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Activate/DeActivate Cluster Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(IgniteClusterActivateDeactivateTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    IgniteClusterActivateDeactivateTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteStandByClusterTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteStandByClientReconnectTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteStandByClientReconnectToNewClusterTest.class));
+    IgniteStandByClusterTest.class,
+    IgniteStandByClientReconnectTest.class,
+    IgniteStandByClientReconnectToNewClusterTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToActiveCluster.class));
-        suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToInActiveCluster.class));
-        suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToActiveCluster.class));
-        suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToInActiveCluster.class));
+    JoinActiveNodeToActiveCluster.class,
+    JoinActiveNodeToInActiveCluster.class,
+    JoinInActiveNodeToActiveCluster.class,
+    JoinInActiveNodeToInActiveCluster.class,
 
-        suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToActiveClusterWithPersistence.class));
-        suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToInActiveClusterWithPersistence.class));
-        suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToActiveClusterWithPersistence.class));
-        suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToInActiveClusterWithPersistence.class));
+    JoinActiveNodeToActiveClusterWithPersistence.class,
+    JoinActiveNodeToInActiveClusterWithPersistence.class,
+    JoinInActiveNodeToActiveClusterWithPersistence.class,
+    JoinInActiveNodeToInActiveClusterWithPersistence.class,
 
-//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateTest.class));
-//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateCacheTest.class));
-//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateDataStructureTest.class));
-//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateServiceTest.class));
+//TODO https://issues.apache.org/jira/browse/IGNITE-9081 IgniteChangeGlobalStateTest.class,
+//TODO https://issues.apache.org/jira/browse/IGNITE-9081 IgniteChangeGlobalStateCacheTest.class,
+//TODO https://issues.apache.org/jira/browse/IGNITE-9081 IgniteChangeGlobalStateDataStructureTest.class,
+//TODO https://issues.apache.org/jira/browse/IGNITE-9081 IgniteChangeGlobalStateServiceTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateDataStreamerTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateFailOverTest.class));
+    IgniteChangeGlobalStateDataStreamerTest.class,
+    IgniteChangeGlobalStateFailOverTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(IgniteNoParrallelClusterIsAllowedTest.class));
+    IgniteNoParrallelClusterIsAllowedTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(CacheBaselineTopologyTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteBaselineAffinityTopologyActivationTest.class));
-
-        return suite;
-    }
+    CacheBaselineTopologyTest.class,
+    IgniteBaselineAffinityTopologyActivationTest.class
+})
+public class IgniteStandByClusterSuite {
 }
index 815c658..1ebbb4e 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.startup.cmdline.GridCommandLineTransformerSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Loaders self-test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({GridCommandLineTransformerSelfTest.class})
 public class IgniteStartUpTestSuite {
-    /**
-     * @return  Loaders tests suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite StartUp Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridCommandLineTransformerSelfTest.class));
-
-        return suite;
-    }
 }
index ab4650d..3556543 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.stream.socket.SocketStreamerSelfTest;
 import org.apache.ignite.stream.socket.SocketStreamerUnmarshalVulnerabilityTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Stream test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    SocketStreamerSelfTest.class,
+    SocketStreamerUnmarshalVulnerabilityTest.class,
+})
 public class IgniteStreamSelfTestSuite {
-    /**
-     * @return Stream tests suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Stream Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(SocketStreamerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(SocketStreamerUnmarshalVulnerabilityTest.class));
-
-        return suite;
-    }
 }
index 8ab1dae..3412897 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.session.GridSessionCancelSiblingsFromFutureSelfTest;
 import org.apache.ignite.session.GridSessionCancelSiblingsFromJobSelfTest;
 import org.apache.ignite.session.GridSessionCancelSiblingsFromTaskSelfTest;
@@ -39,39 +37,32 @@ import org.apache.ignite.session.GridSessionSetTaskAttributeSelfTest;
 import org.apache.ignite.session.GridSessionTaskWaitJobAttributeSelfTest;
 import org.apache.ignite.session.GridSessionWaitAttributeSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Task session test suite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridSessionCancelSiblingsFromFutureSelfTest.class,
+    GridSessionCancelSiblingsFromJobSelfTest.class,
+    GridSessionCancelSiblingsFromTaskSelfTest.class,
+    GridSessionSetFutureAttributeSelfTest.class,
+    GridSessionSetFutureAttributeWaitListenerSelfTest.class,
+    GridSessionSetJobAttributeWaitListenerSelfTest.class,
+    GridSessionSetJobAttributeSelfTest.class,
+    GridSessionSetJobAttribute2SelfTest.class,
+    GridSessionJobWaitTaskAttributeSelfTest.class,
+    GridSessionSetTaskAttributeSelfTest.class,
+    GridSessionFutureWaitTaskAttributeSelfTest.class,
+    GridSessionFutureWaitJobAttributeSelfTest.class,
+    GridSessionTaskWaitJobAttributeSelfTest.class,
+    GridSessionSetJobAttributeOrderSelfTest.class,
+    GridSessionWaitAttributeSelfTest.class,
+    GridSessionJobFailoverSelfTest.class,
+    GridSessionLoadSelfTest.class,
+    GridSessionCollisionSpiSelfTest.class,
+    GridSessionCheckpointSelfTest.class
+})
 public class IgniteTaskSessionSelfTestSuite {
-    /**
-     * @return TaskSession test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite TaskSession Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromFutureSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromJobSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromTaskSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetFutureAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetFutureAttributeWaitListenerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttributeWaitListenerSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttribute2SelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionJobWaitTaskAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetTaskAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionFutureWaitTaskAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionFutureWaitJobAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionTaskWaitJobAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttributeOrderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionWaitAttributeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionJobFailoverSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionLoadSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionCollisionSpiSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSessionCheckpointSelfTest.class));
-
-        return suite;
-    }
 }
index 50bdbdc..b1af429 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessorSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Suite for {@link GridTimeoutProcessor} tests.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({GridTimeoutProcessorSelfTest.class})
 public class IgniteTimeoutProcessorSelfTestSuite {
-    /**
-     * @return Job metrics test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Timeout Processor Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridTimeoutProcessorSelfTest.class));
-
-        return suite;
-    }
 }
index 1466b85..4fddbe0 100644 (file)
@@ -17,8 +17,9 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import junit.framework.TestSuite;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorGridSplitCacheTest;
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorNearPartitionedAtomicCacheGroupsTest;
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorNearPartitionedAtomicCacheTest;
@@ -33,20 +34,17 @@ import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorReplic
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorReplicatedTxCacheGroupsTest;
 import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorReplicatedTxCacheTest;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
 
 /**
  * Topology validator test suite.
  */
-@RunWith(AllTests.class)
 public class IgniteTopologyValidatorTestSuite {
     /**
      * @param ignoredTests Ignored tests.
      * @return Topology validator tests suite.
      */
-    public static TestSuite suite(Collection<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Topology validator Test Suite");
+    public static List<Class<?>> suite(Collection<Class> ignoredTests) {
+        List<Class<?>> suite = new ArrayList<>();
 
         GridTestUtils.addTestIfNeeded(suite, IgniteTopologyValidatorNearPartitionedAtomicCacheTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, IgniteTopologyValidatorNearPartitionedTxCacheTest.class, ignoredTests);
index 34e3d4a..3176057 100644 (file)
@@ -17,9 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.Set;
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.commandline.CommandHandlerParsingTest;
 import org.apache.ignite.internal.pagemem.impl.PageIdUtilsSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheUtilsSelfTest;
@@ -42,7 +39,6 @@ import org.apache.ignite.internal.util.tostring.IncludeSensitiveAtomicTest;
 import org.apache.ignite.internal.util.tostring.IncludeSensitiveTransactionalTest;
 import org.apache.ignite.lang.GridByteArrayListSelfTest;
 import org.apache.ignite.spi.discovery.ClusterMetricsSnapshotSerializeSelfTest;
-import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.thread.GridThreadPoolExecutorServiceSelfTest;
 import org.apache.ignite.thread.GridThreadTest;
 import org.apache.ignite.thread.IgniteThreadPoolSizeTest;
@@ -64,83 +60,68 @@ import org.apache.ignite.util.mbeans.GridMBeanExoticNamesSelfTest;
 import org.apache.ignite.util.mbeans.GridMBeanSelfTest;
 import org.apache.ignite.util.mbeans.WorkersControlMXBeanTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test suite for Ignite utility classes.
  */
-@RunWith(AllTests.class)
-public class IgniteUtilSelfTestSuite {
-    /**
-     * @return Grid utility methods tests suite.
-     */
-    public static TestSuite suite() {
-        return suite(null);
-    }
-
-    /**
-     * @param ignoredTests Tests don't include in the execution.
-     * @return Test suite.
-     */
-    public static TestSuite suite(Set<Class> ignoredTests) {
-        TestSuite suite = new TestSuite("Ignite Util Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(GridThreadPoolExecutorServiceSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteThreadPoolSizeTest.class));
-        GridTestUtils.addTestIfNeeded(suite, IgniteUtilsSelfTest.class, ignoredTests);
-        suite.addTest(new JUnit4TestAdapter(GridSpinReadWriteLockSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridQueueSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridStringBuilderFactorySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridToStringBuilderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(CircularStringBuilderSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridByteArrayListSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMBeanSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMBeanDisableSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMBeanExoticNamesSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLongListSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridThreadTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridIntListSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridArraysSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridCacheUtilsSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteExceptionRegistrySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridMessageCollectionTest.class));
-        suite.addTest(new JUnit4TestAdapter(WorkersControlMXBeanTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedDequeMultiThreadedTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridLogThrottleTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridRandomSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridSnapshotLockSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTopologyHeapSizeSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridTransientTest.class));
-        suite.addTest(new JUnit4TestAdapter(IgniteDevOnlyLogTest.class));
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    GridThreadPoolExecutorServiceSelfTest.class,
+    IgniteThreadPoolSizeTest.class,
+    IgniteUtilsSelfTest.class,
+    GridSpinReadWriteLockSelfTest.class,
+    GridQueueSelfTest.class,
+    GridStringBuilderFactorySelfTest.class,
+    GridToStringBuilderSelfTest.class,
+    CircularStringBuilderSelfTest.class,
+    GridByteArrayListSelfTest.class,
+    GridMBeanSelfTest.class,
+    GridMBeanDisableSelfTest.class,
+    GridMBeanExoticNamesSelfTest.class,
+    GridLongListSelfTest.class,
+    GridThreadTest.class,
+    GridIntListSelfTest.class,
+    GridArraysSelfTest.class,
+    GridCacheUtilsSelfTest.class,
+    IgniteExceptionRegistrySelfTest.class,
+    GridMessageCollectionTest.class,
+    WorkersControlMXBeanTest.class,
+    GridConcurrentLinkedDequeMultiThreadedTest.class,
+    GridLogThrottleTest.class,
+    GridRandomSelfTest.class,
+    GridSnapshotLockSelfTest.class,
+    GridTopologyHeapSizeSelfTest.class,
+    GridTransientTest.class,
+    IgniteDevOnlyLogTest.class,
 
-        // Sensitive toString.
-        suite.addTest(new JUnit4TestAdapter(IncludeSensitiveAtomicTest.class));
-        suite.addTest(new JUnit4TestAdapter(IncludeSensitiveTransactionalTest.class));
+    // Sensitive toString.
+    IncludeSensitiveAtomicTest.class,
+    IncludeSensitiveTransactionalTest.class,
 
-        // Metrics.
-        suite.addTest(new JUnit4TestAdapter(ClusterMetricsSnapshotSerializeSelfTest.class));
+    // Metrics.
+    ClusterMetricsSnapshotSerializeSelfTest.class,
 
-        // Unsafe.
-        suite.addTest(new JUnit4TestAdapter(GridUnsafeMemorySelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridUnsafeStripedLruSefTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridUnsafeMapSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(GridUnsafePartitionedMapSelfTest.class));
+    // Unsafe.
+    GridUnsafeMemorySelfTest.class,
+    GridUnsafeStripedLruSefTest.class,
+    GridUnsafeMapSelfTest.class,
+    GridUnsafePartitionedMapSelfTest.class,
 
-        // NIO.
-        suite.addTest(new JUnit4TestAdapter(GridNioSessionMetaKeySelfTest.class));
-        GridTestUtils.addTestIfNeeded(suite, GridNioSelfTest.class, ignoredTests);
-        suite.addTest(new JUnit4TestAdapter(GridNioFilterChainSelfTest.class));
-        GridTestUtils.addTestIfNeeded(suite, GridNioSslSelfTest.class, ignoredTests);
-        suite.addTest(new JUnit4TestAdapter(GridNioDelimitedBufferSelfTest.class));
+    // NIO.
+    GridNioSessionMetaKeySelfTest.class,
+    GridNioSelfTest.class,
+    GridNioFilterChainSelfTest.class,
+    GridNioSslSelfTest.class,
+    GridNioDelimitedBufferSelfTest.class,
 
-        suite.addTest(new JUnit4TestAdapter(GridPartitionMapSelfTest.class));
+    GridPartitionMapSelfTest.class,
 
-        //dbx
-        suite.addTest(new JUnit4TestAdapter(PageIdUtilsSelfTest.class));
+    //dbx
+    PageIdUtilsSelfTest.class,
 
-        // control.sh
-        suite.addTest(new JUnit4TestAdapter(CommandHandlerParsingTest.class));
-
-        return suite;
-    }
+    // control.sh
+    CommandHandlerParsingTest.class,
+})
+public class IgniteUtilSelfTestSuite {
 }
index 68695af..255e07f 100644 (file)
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.transactions.DepthFirstSearchTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxDeadlockDetectionMessageMarshallingTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxDeadlockDetectionNoHangsTest;
@@ -29,30 +27,23 @@ import org.apache.ignite.internal.processors.cache.transactions.TxOptimisticDead
 import org.apache.ignite.internal.processors.cache.transactions.TxPessimisticDeadlockDetectionCrossCacheTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxPessimisticDeadlockDetectionTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Deadlock detection related tests.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    DepthFirstSearchTest.class,
+    TxOptimisticDeadlockDetectionTest.class,
+    TxOptimisticDeadlockDetectionCrossCacheTest.class,
+    TxPessimisticDeadlockDetectionTest.class,
+    TxPessimisticDeadlockDetectionCrossCacheTest.class,
+    //TxDeadlockCauseTest.class,
+    TxDeadlockDetectionTest.class,
+    TxDeadlockDetectionNoHangsTest.class,
+    TxDeadlockDetectionUnmasrhalErrorsTest.class,
+    TxDeadlockDetectionMessageMarshallingTest.class
+})
 public class TxDeadlockDetectionTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Deadlock Detection Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(DepthFirstSearchTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxOptimisticDeadlockDetectionTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxOptimisticDeadlockDetectionCrossCacheTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxPessimisticDeadlockDetectionTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxPessimisticDeadlockDetectionCrossCacheTest.class));
-        //suite.addTest(new JUnit4TestAdapter(TxDeadlockCauseTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionNoHangsTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionUnmasrhalErrorsTest.class));
-        suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionMessageMarshallingTest.class));
-
-        return suite;
-    }
 }
index 312c976..6bf7ab6 100644 (file)
  */
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.persistence.file.IgniteNativeIoWithNoPersistenceTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Subset of {@link IgnitePdsTestSuite} suite test, started with direct-oi jar in classpath.
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsNativeIoTestSuite.DynamicSuite.class)
 public class IgnitePdsNativeIoTestSuite {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite (with Direct IO)");
+    public static List<Class<?>> suite() {
+        List<Class<?>> suite = new ArrayList<>();
 
         IgnitePdsTestSuite.addRealPageStoreTests(suite, null);
 
         //long running test by design with light parameters
-        suite.addTest(new JUnit4TestAdapter(IgnitePdsReplacementNativeIoTest.class));
+        suite.add(IgnitePdsReplacementNativeIoTest.class);
 
-        suite.addTest(new JUnit4TestAdapter(IgniteNativeIoWithNoPersistenceTest.class));
+        suite.add(IgniteNativeIoWithNoPersistenceTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 6135c62..cc38ff4 100644 (file)
  */
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.ignite.internal.processors.cache.persistence.DiskPageCompressionIntegrationDirectIOTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteNativeIoPdsRecoveryAfterFileCorruptionTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteNativeIoWalFlushFsyncSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 
 /**
  * Same as {@link IgnitePdsTestSuite2} but is started with direct-oi jar in classpath.
  */
-@RunWith(AllTests.class)
+@RunWith(IgnitePdsNativeIoTestSuite2.DynamicSuite.class)
 public class IgnitePdsNativeIoTestSuite2 {
     /**
      * @return Suite.
      */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite 2 (Native IO)");
+    public static List<Class<?>> suite() {
+        List<Class<?>> suite = new ArrayList<>();
 
         IgnitePdsTestSuite2.addRealPageStoreTests(suite, null);
 
         // Direct IO + Page compression.
-        suite.addTest(new JUnit4TestAdapter(DiskPageCompressionIntegrationDirectIOTest.class));
+        suite.add(DiskPageCompressionIntegrationDirectIOTest.class);
 
         //Integrity test with reduced count of pages.
-        suite.addTest(new JUnit4TestAdapter(IgniteNativeIoPdsRecoveryAfterFileCorruptionTest.class));
+        suite.add(IgniteNativeIoPdsRecoveryAfterFileCorruptionTest.class);
 
-        suite.addTest(new JUnit4TestAdapter(IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.class));
+        suite.add(IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.class);
 
-        suite.addTest(new JUnit4TestAdapter(IgniteNativeIoWalFlushFsyncSelfTest.class));
+        suite.add(IgniteNativeIoWalFlushFsyncSelfTest.class);
 
         return suite;
     }
+
+    /** */
+    public static class DynamicSuite extends Suite {
+        /** */
+        public DynamicSuite(Class<?> cls) throws InitializationError {
+            super(cls, suite().toArray(new Class<?>[] {null}));
+        }
+    }
 }
index 0cd52a7..300777d 100644 (file)
 
 package org.apache.ignite.stream.flume;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Tests for a Flume sink for Ignite.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({IgniteSinkTest.class})
 public class IgniteSinkTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Apache Flume NG Sink Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(IgniteSinkTest.class));
-
-        return suite;
-    }
 }
index d95748d..8d6cbe5 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinderSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Google Compute Engine integration tests.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({TcpDiscoveryGoogleStorageIpFinderSelfTest.class})
 public class IgniteGCETestSuite {
     /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Google Compute Engine Integration Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(TcpDiscoveryGoogleStorageIpFinderSelfTest.class));
-
-        return suite;
-    }
-
-    /**
      * @return Service Account Id.
      */
     public static String getServiceAccountId() {
index 67c06c2..0db0aa5 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.query.h2.H2IndexingGeoSelfTest;
 import org.apache.ignite.internal.processors.query.h2.H2IndexingSegmentedGeoSelfTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Geospatial indexing tests.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    H2IndexingGeoSelfTest.class,
+    H2IndexingSegmentedGeoSelfTest.class
+})
 public class GeoSpatialIndexingTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("H2 Geospatial Indexing Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(H2IndexingGeoSelfTest.class));
-        suite.addTest(new JUnit4TestAdapter(H2IndexingSegmentedGeoSelfTest.class));
-
-        return suite;
-    }
 }
index 196ad99..ec0906b 100644 (file)
 
 package org.apache.ignite.testsuites;
 
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnCreateDestoryIndexTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnSqlQueryTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.AllTests;
+import org.junit.runners.Suite;
 
 /**
  * Test suite for cache queries.
  */
-@RunWith(AllTests.class)
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    CacheBlockOnSqlQueryTest.class,
+    CacheBlockOnCreateDestoryIndexTest.class
+})
 public class IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite {
-    /**
-     * @return Test suite.
-     */
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite("Do Not Block Read Operations Test Suite");
-
-        suite.addTest(new JUnit4TestAdapter(CacheBlockOnSqlQueryTest.class));
-        suite.addTest(new JUnit4TestAdapter(CacheBlockOnCreateDestoryIndexTest.class));
-
-        return suite;
-    }
 }
index e357477..bd2891f 100644 (file)
@@ -20,6 +20,7 @@ package org.apache.ignite.spi.discovery.zk;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import junit.framework.TestSuite;
 import org.apache.curator.test.InstanceSpec;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.zk.curator.TestingCluster;
 import org.apache.ignite.IgniteException;
@@ -31,7 +32,7 @@ import org.apache.ignite.testframework.config.GridTestProperties;
 /**
  * Allows to run regular Ignite tests with {@link org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi}.
  */
-public abstract class ZookeeperDiscoverySpiAbstractTestSuite {
+public abstract class ZookeeperDiscoverySpiAbstractTestSuite extends TestSuite {
     /** */
     private static TestingCluster testingCluster;
 
index 78c660e..c6a67f3 100644 (file)
 
 package org.apache.ignite.spi.discovery.zk;
 
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.TestSuite;
 import org.apache.ignite.internal.IgniteClientReconnectCacheTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNodeRestartTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeFullApiSelfTest;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.zk.curator.TestingCluster;
 import org.apache.ignite.util.GridCommandHandlerTest;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
 
 /**
  * Regular Ignite tests executed with {@link org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi}.
  */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    GridCachePartitionedNodeRestartTest.class,
-    IgniteCacheEntryListenerWithZkDiscoAtomicTest.class,
-    IgniteClientReconnectCacheTest.class,
-    GridCachePartitionedMultiNodeFullApiSelfTest.class,
-    GridCacheReplicatedMultiNodeFullApiSelfTest.class,
-    GridCommandHandlerTest.class
-})
 public class ZookeeperDiscoverySpiTestSuite2 extends ZookeeperDiscoverySpiAbstractTestSuite {
     /** */
-    @BeforeClass
-    public static void init() throws Exception {
+    private static TestingCluster testingCluster;
+
+    /**
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
         System.setProperty("H2_JDBC_CONNECTIONS", "500"); // For multi-jvm tests.
 
         initSuite();
+
+        TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite");
+
+        suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTest.class));
+        suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerWithZkDiscoAtomicTest.class));
+        suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCacheTest.class));
+        suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeFullApiSelfTest.class));
+        suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiNodeFullApiSelfTest.class));
+        suite.addTest(new JUnit4TestAdapter(GridCommandHandlerTest.class));
+
+        return suite;
     }
 }