[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,8 +170,10 @@ public class ElasticsearchRestTests extends ElasticsearchIntegrationTest {
@AfterClass
public static void close() {
restTestExecutionContext.close();
restTestExecutionContext = null;
if (restTestExecutionContext != null) {
restTestExecutionContext.close();
restTestExecutionContext = null;
}
}
/**