[TEST] Only close GLOBAL_CLUSTER if it's non-null

This commit is contained in:
Simon Willnauer 2014-09-17 14:53:14 +02:00
parent 8a70b115f2
commit 2be018db84
1 changed files with 3 additions and 1 deletions

View File

@ -618,7 +618,9 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
// tests get a new / clean cluster
clearClusters();
if (currentCluster == GLOBAL_CLUSTER) {
GLOBAL_CLUSTER.close();
if (GLOBAL_CLUSTER != null) {
GLOBAL_CLUSTER.close();
}
GLOBAL_CLUSTER = null;
initializeGlobalCluster(); // re-init that cluster
}