diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/ExpressionFactoryTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/ExpressionFactoryTest.java index cb5b09f7e81..3e0d0224993 100644 --- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/ExpressionFactoryTest.java +++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/ExpressionFactoryTest.java @@ -24,6 +24,7 @@ import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.analytics.function.ReductionCollectionManager; import org.apache.solr.analytics.value.constant.ConstantValue; import org.apache.solr.schema.IndexSchema; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -55,6 +56,11 @@ public class ExpressionFactoryTest extends SolrTestCaseJ4 { indexSchema = h.getCore().getLatestSchema(); } + @AfterClass + public static void cleanUp() throws Exception { + indexSchema = null; + } + private ExpressionFactory getExpressionFactory() { ExpressionFactory fact = new ExpressionFactory(indexSchema); fact.startRequest(); diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/AbstractAnalyticsFieldTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/AbstractAnalyticsFieldTest.java index 7b20e75cd5a..3c9ee6e7c57 100644 --- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/AbstractAnalyticsFieldTest.java +++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/AbstractAnalyticsFieldTest.java @@ -228,6 +228,9 @@ public class AbstractAnalyticsFieldTest extends SolrTestCaseJ4 { ref.decref(); ref = null; } + indexSchema = null; + searcher = null; + ref = null; } protected void checkSingleFieldValues(Map expected, Map found, Set missing) {