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