diff --git a/src/test/java/org/elasticsearch/test/integration/ElasticsearchTestCase.java b/src/test/java/org/elasticsearch/test/integration/ElasticsearchTestCase.java index 7b747e77b34..6a127a4a2a3 100644 --- a/src/test/java/org/elasticsearch/test/integration/ElasticsearchTestCase.java +++ b/src/test/java/org/elasticsearch/test/integration/ElasticsearchTestCase.java @@ -21,7 +21,10 @@ package org.elasticsearch.test.integration; import com.carrotsearch.randomizedtesting.JUnit4MethodProvider; import com.carrotsearch.randomizedtesting.RandomizedTest; import com.carrotsearch.randomizedtesting.ThreadFilter; -import com.carrotsearch.randomizedtesting.annotations.*; +import com.carrotsearch.randomizedtesting.annotations.Listeners; +import com.carrotsearch.randomizedtesting.annotations.TestMethodProviders; +import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; +import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope; import org.apache.lucene.util.LuceneJUnit3MethodProvider; import org.apache.lucene.util.LuceneTestCase; @@ -30,34 +33,35 @@ import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.junit.listerners.ReproduceInfoPrinter; import org.junit.runner.RunWith; + @TestMethodProviders({ - LuceneJUnit3MethodProvider.class, - JUnit4MethodProvider.class - }) + LuceneJUnit3MethodProvider.class, + JUnit4MethodProvider.class +}) @Listeners({ - ReproduceInfoPrinter.class + ReproduceInfoPrinter.class }) @ThreadLeakFilters(defaultFilters = true, filters = {ElasticsearchTestCase.ElasticSearchThreadFilter.class}) @ThreadLeakScope(Scope.NONE) @RunWith(value = com.carrotsearch.randomizedtesting.RandomizedRunner.class) -public class ElasticsearchTestCase extends RandomizedTest { - +public abstract class ElasticsearchTestCase extends RandomizedTest { + public static final Version TEST_VERSION_CURRENT = LuceneTestCase.TEST_VERSION_CURRENT; - + protected final ESLogger logger = Loggers.getLogger(getClass()); public static final boolean NIGHLY = Boolean.parseBoolean(System.getProperty("es.tests.nighly", "false")); // disabled by default - + public static final String CHILD_VM_ID = System.getProperty("junit4.childvm.id", "" + System.currentTimeMillis()); - + public static final String SYSPROP_BADAPPLES = "tests.badapples"; - + public static class ElasticSearchThreadFilter implements ThreadFilter { @Override public boolean reject(Thread t) { - - return true; + + return true; } - } - + } + } diff --git a/src/test/java/org/elasticsearch/test/integration/cluster/AbstractZenNodesTests.java b/src/test/java/org/elasticsearch/test/integration/cluster/AbstractZenNodesTests.java index 382702dad05..85646d28eaf 100644 --- a/src/test/java/org/elasticsearch/test/integration/cluster/AbstractZenNodesTests.java +++ b/src/test/java/org/elasticsearch/test/integration/cluster/AbstractZenNodesTests.java @@ -27,9 +27,8 @@ import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilde /** * */ -public class AbstractZenNodesTests extends AbstractNodesTests { +public abstract class AbstractZenNodesTests extends AbstractNodesTests { - @Override protected final Settings getClassDefaultSettings() { // we force zen discovery here since it has specific handling for specific master / data nodes