[TEST] Remove global scope mentions

We removed the global cluster with #9781, yet there were still a few mentions of it in comments. Removed them.
This commit is contained in:
javanna 2015-02-26 12:00:30 +01:00 committed by Luca Cavanna
parent de639961a1
commit 46461c7730
4 changed files with 6 additions and 10 deletions

View File

@ -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 {

View File

@ -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;
}

View File

@ -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.
*/

View File

@ -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<InetSocketAddress> newAddresses = Sets.newHashSet(addresses);
Set<InetSocketAddress> previousAddresses = Sets.newHashSet(restClient.httpAddresses());
if (!newAddresses.equals(previousAddresses)) {