From 8aca504c863d2351258e33e86b2c18e9365bbf99 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Wed, 21 Dec 2016 13:39:28 -0500 Subject: [PATCH] Clear static variable after suite This was causing test failures: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+java9-periodic/1101/console https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+dockeralpine-periodic/513/consoleFull --- .../elasticsearch/index/query/QueryParseContextTests.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/test/java/org/elasticsearch/index/query/QueryParseContextTests.java b/core/src/test/java/org/elasticsearch/index/query/QueryParseContextTests.java index 1e00176f558..c509468a1a7 100644 --- a/core/src/test/java/org/elasticsearch/index/query/QueryParseContextTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/QueryParseContextTests.java @@ -30,6 +30,7 @@ import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.search.SearchModule; import org.elasticsearch.test.ESTestCase; import org.junit.After; +import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -45,6 +46,11 @@ public class QueryParseContextTests extends ESTestCase { xContentRegistry = new NamedXContentRegistry(new SearchModule(Settings.EMPTY, false, emptyList()).getNamedXContents()); } + @AfterClass + public static void cleanup() { + xContentRegistry = null; + } + private ThreadContext threadContext; @Before