[TEST] close REST test execution context only if not null

The context can be null when REST tests are disabled via sysprop.
This commit is contained in:
javanna 2014-09-18 16:14:10 +02:00 committed by Luca Cavanna
parent f0e9b7b8ef
commit 5e1f95ca93
1 changed files with 4 additions and 2 deletions

View File

@ -170,9 +170,11 @@ public class ElasticsearchRestTests extends ElasticsearchIntegrationTest {
@AfterClass
public static void close() {
if (restTestExecutionContext != null) {
restTestExecutionContext.close();
restTestExecutionContext = null;
}
}
/**
* Used to obtain settings for the REST client that is used to send REST requests.