diff --git a/src/test/java/org/elasticsearch/test/CurrentTestFailedMarker.java b/src/test/java/org/elasticsearch/test/CurrentTestFailedMarker.java index 4ab7db2e939..24e1e6034f4 100644 --- a/src/test/java/org/elasticsearch/test/CurrentTestFailedMarker.java +++ b/src/test/java/org/elasticsearch/test/CurrentTestFailedMarker.java @@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * A {@link RunListener} that detects test failures. We need it because we need - * to reset the global / suite level cluster if a test fails but don't wanna reset it + * to reset the suite level cluster if a test fails but don't wanna reset it * for every subsequent test. */ public class CurrentTestFailedMarker extends RunListener { diff --git a/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java b/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java index b251f6fbc3d..980b8010198 100644 --- a/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java +++ b/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java @@ -244,8 +244,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase /** * The current cluster depending on the configured {@link Scope}. - * By default if no {@link ClusterScope} is configured this will hold a reference to the global cluster carried - * on across test suites. + * By default if no {@link ClusterScope} is configured this will hold a reference to the suite cluster. */ private static TestCluster currentCluster; @@ -603,10 +602,8 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase // TODO: it looks like CurrentTestFailedMarker is never set at this point, so testFailed() will always be false? if (!success || CurrentTestFailedMarker.testFailed()) { // if we failed that means that something broke horribly so we should - // clear all clusters and if the current cluster is the global we shut that one - // down as well to prevent subsequent tests from failing due to the same problem. - // we also reset everything in the case we had a failure in the suite to make sure subsequent - // tests get a new / clean cluster + // clear all clusters. we also reset everything in the case we had a failure + // in the suite to make sure subsequent tests get a new / clean cluster clearClusters(); currentCluster = null; } diff --git a/src/test/java/org/elasticsearch/test/ElasticsearchThreadFilter.java b/src/test/java/org/elasticsearch/test/ElasticsearchThreadFilter.java index 156d97d8339..7428a2cb19f 100644 --- a/src/test/java/org/elasticsearch/test/ElasticsearchThreadFilter.java +++ b/src/test/java/org/elasticsearch/test/ElasticsearchThreadFilter.java @@ -27,8 +27,7 @@ import java.util.regex.Pattern; /** * Simple thread filter for randomized runner - * This filter rejectes all threads that are known to leak across - * tests / suites ie. the global test cluster threads etc. + * This filter rejectes all threads that are known to leak across tests / suites * It will cause threads leaking from threadpools / executors in unittests * to fail the test. */ diff --git a/src/test/java/org/elasticsearch/test/rest/RestTestExecutionContext.java b/src/test/java/org/elasticsearch/test/rest/RestTestExecutionContext.java index 275b2d652da..1b022b552ba 100644 --- a/src/test/java/org/elasticsearch/test/rest/RestTestExecutionContext.java +++ b/src/test/java/org/elasticsearch/test/rest/RestTestExecutionContext.java @@ -125,7 +125,7 @@ public class RestTestExecutionContext implements Closeable { restClient = new RestClient(restSpec, settings, addresses); } else { //re-initialize the REST client if the addresses have changed - //happens if there's a failure since we restart the global cluster due to that + //happens if there's a failure since we restart the suite cluster due to that Set newAddresses = Sets.newHashSet(addresses); Set previousAddresses = Sets.newHashSet(restClient.httpAddresses()); if (!newAddresses.equals(previousAddresses)) {