fix static leaks, null stuff out in afterclass

This commit is contained in:
Robert Muir 2019-12-03 06:28:19 -05:00
parent c8c9c10023
commit 9e5d11be8a
2 changed files with 9 additions and 0 deletions

View File

@ -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();

View File

@ -228,6 +228,9 @@ public class AbstractAnalyticsFieldTest extends SolrTestCaseJ4 {
ref.decref();
ref = null;
}
indexSchema = null;
searcher = null;
ref = null;
}
protected <T> void checkSingleFieldValues(Map<String,T> expected, Map<String,T> found, Set<String> missing) {