Skip to content

Commit

Permalink
IGNITE-10776 Migrate config variations test suites from JUnit 3 to 4 -
Browse files Browse the repository at this point in the history
…Fixes #5781.

Signed-off-by: Ilya Kasnacheev <ilya.kasnacheev@gmail.com>
  • Loading branch information
sergey-chugunov-1985 authored and alamar committed Jan 24, 2019
1 parent c659f9c commit 985d66c
Show file tree
Hide file tree
Showing 56 changed files with 992 additions and 985 deletions.
Expand Up @@ -24,17 +24,15 @@
import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationAsyncTest; import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationAsyncTest;
import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationTest; import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationTest;
import org.apache.ignite.internal.processors.compress.FileSystemUtilsTest; import org.apache.ignite.internal.processors.compress.FileSystemUtilsTest;
import org.apache.ignite.testframework.junits.DynamicSuite;
import org.junit.runner.RunWith; 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_DATA_STORAGE_PAGE_SIZE;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_DEFAULT_DISK_PAGE_COMPRESSION; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DEFAULT_DISK_PAGE_COMPRESSION;
import static org.apache.ignite.configuration.DiskPageCompression.ZSTD; import static org.apache.ignite.configuration.DiskPageCompression.ZSTD;


/** /** */
*/ @RunWith(DynamicSuite.class)
@RunWith(IgnitePdsCompressionTestSuite.DynamicSuite.class)
public class IgnitePdsCompressionTestSuite { public class IgnitePdsCompressionTestSuite {
/** /**
* @return Suite. * @return Suite.
Expand All @@ -60,12 +58,4 @@ static void enableCompressionByDefault() {
System.setProperty(IGNITE_DEFAULT_DISK_PAGE_COMPRESSION, ZSTD.name()); System.setProperty(IGNITE_DEFAULT_DISK_PAGE_COMPRESSION, ZSTD.name());
System.setProperty(IGNITE_DEFAULT_DATA_STORAGE_PAGE_SIZE, String.valueOf(8 * 1024)); 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}));
}
}
} }
Expand Up @@ -19,15 +19,13 @@


import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.ignite.testframework.junits.DynamicSuite;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;


import static org.apache.ignite.testsuites.IgnitePdsCompressionTestSuite.enableCompressionByDefault; import static org.apache.ignite.testsuites.IgnitePdsCompressionTestSuite.enableCompressionByDefault;


/** /** */
*/ @RunWith(DynamicSuite.class)
@RunWith(IgnitePdsCompressionTestSuite2.DynamicSuite.class)
public class IgnitePdsCompressionTestSuite2 { public class IgnitePdsCompressionTestSuite2 {
/** /**
* @return Suite. * @return Suite.
Expand All @@ -40,12 +38,4 @@ public static List<Class<?>> suite() {


return suite; return suite;
} }

/** */
public static class DynamicSuite extends Suite {
/** */
public DynamicSuite(Class<?> cls) throws InitializationError {
super(cls, suite().toArray(new Class<?>[] {null}));
}
}
} }
Expand Up @@ -21,14 +21,13 @@
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.DynamicSuite;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;


/** /**
* Cache interceptor suite. * Cache interceptor suite.
*/ */
@RunWith(IgniteCacheInterceptorSelfTestSuite.DynamicSuite.class) @RunWith(DynamicSuite.class)
public class IgniteCacheInterceptorSelfTestSuite { public class IgniteCacheInterceptorSelfTestSuite {
/** /**
* @return Cache API test suite. * @return Cache API test suite.
Expand All @@ -44,45 +43,37 @@ public static List<Class<?>> suite() {
public static List<Class<?>> suite(Collection<Class> ignoredTests) { public static List<Class<?>> suite(Collection<Class> ignoredTests) {
List<Class<?>> suite = new ArrayList<>(); List<Class<?>> suite = new ArrayList<>();


GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorLocalSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorLocalSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorLocalWithStoreSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorLocalWithStoreSelfTest.class, ignoredTests);


GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorLocalAtomicSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorLocalAtomicSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorLocalAtomicWithStoreSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorLocalAtomicWithStoreSelfTest.class, ignoredTests);


GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorAtomicSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorAtomicSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorAtomicNearEnabledSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorAtomicNearEnabledSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorAtomicWithStoreSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorAtomicWithStoreSelfTest.class, ignoredTests);


GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorAtomicReplicatedSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorAtomicReplicatedSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorAtomicWithStoreReplicatedSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorAtomicWithStoreReplicatedSelfTest.class, ignoredTests);


GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorNearEnabledSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorNearEnabledSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorWithStoreSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorWithStoreSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorReplicatedSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorReplicatedSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorReplicatedWithStoreSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorReplicatedWithStoreSelfTest.class, ignoredTests);


// TODO GG-11141. // TODO GG-11141.
// GridTestUtils.addTestIfNeeded(suite,GridCacheOnCopyFlagTxPartitionedSelfTest.class, ignoredTests); // GridTestUtils.addTestIfNeeded(suite, GridCacheOnCopyFlagTxPartitionedSelfTest.class, ignoredTests);
// GridTestUtils.addTestIfNeeded(suite,GridCacheOnCopyFlagReplicatedSelfTest.class, ignoredTests); // GridTestUtils.addTestIfNeeded(suite, GridCacheOnCopyFlagReplicatedSelfTest.class, ignoredTests);
// GridTestUtils.addTestIfNeeded(suite,GridCacheOnCopyFlagLocalSelfTest.class, ignoredTests); // GridTestUtils.addTestIfNeeded(suite, GridCacheOnCopyFlagLocalSelfTest.class, ignoredTests);
// GridTestUtils.addTestIfNeeded(suite,GridCacheOnCopyFlagAtomicSelfTest.class, ignoredTests); // GridTestUtils.addTestIfNeeded(suite, GridCacheOnCopyFlagAtomicSelfTest.class, ignoredTests);


GridTestUtils.addTestIfNeeded(suite,CacheInterceptorPartitionCounterRandomOperationsTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, CacheInterceptorPartitionCounterRandomOperationsTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,CacheInterceptorPartitionCounterLocalSanityTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, CacheInterceptorPartitionCounterLocalSanityTest.class, ignoredTests);


GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorAtomicRebalanceTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorAtomicRebalanceTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,GridCacheInterceptorTransactionalRebalanceTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheInterceptorTransactionalRebalanceTest.class, ignoredTests);


return suite; return suite;
} }

/** */
public static class DynamicSuite extends Suite {
/** */
public DynamicSuite(Class<?> cls) throws InitializationError {
super(cls, suite().toArray(new Class<?>[] {null}));
}
}
} }
Expand Up @@ -17,26 +17,20 @@


package org.apache.ignite.internal.processors.cache; package org.apache.ignite.internal.processors.cache;


import junit.framework.TestSuite; import java.util.List;
import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder;
import org.apache.ignite.testframework.junits.DynamicSuite;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.AllTests;


/** /** */
* @RunWith(DynamicSuite.class)
*/
@RunWith(AllTests.class)
public class IgniteCacheReadThroughEvictionsVariationsSuite { public class IgniteCacheReadThroughEvictionsVariationsSuite {
/** /** */
* @return Cache API test suite. public static List<Class<?>> suite() {
*/ return new ConfigVariationsTestSuiteBuilder(IgniteCacheReadThroughEvictionSelfTest.class)
public static TestSuite suite() {
return new ConfigVariationsTestSuiteBuilder(
"Cache Read Through Variations Test",
IgniteCacheReadThroughEvictionSelfTest.class)
.withBasicCacheParams() .withBasicCacheParams()
.withIgniteConfigFilters(new IgnitePredicate<IgniteConfiguration>() { .withIgniteConfigFilters(new IgnitePredicate<IgniteConfiguration>() {
/** {@inheritDoc} */ /** {@inheritDoc} */
Expand All @@ -54,7 +48,6 @@ public static TestSuite suite() {
.skipWaitPartitionMapExchange() .skipWaitPartitionMapExchange()
.gridsCount(4).backups(1) .gridsCount(4).backups(1)
.testedNodesCount(2).withClients() .testedNodesCount(2).withClients()
.build(); .classes();
} }

} }

0 comments on commit 985d66c

Please sign in to comment.