lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject [lucene-solr] branch master updated: fix static leaks, null stuff out in afterclass
Date Tue, 03 Dec 2019 11:28:31 GMT
This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 9e5d11b  fix static leaks, null stuff out in afterclass
9e5d11b is described below

commit 9e5d11be8afb088ee09025735237623c9648a4bf
Author: Robert Muir <rmuir@apache.org>
AuthorDate: Tue Dec 3 06:28:19 2019 -0500

    fix static leaks, null stuff out in afterclass
---
 .../src/test/org/apache/solr/analytics/ExpressionFactoryTest.java   | 6 ++++++
 .../solr/analytics/function/field/AbstractAnalyticsFieldTest.java   | 3 +++
 2 files changed, 9 insertions(+)

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 cb5b09f..3e0d022 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 7b20e75..3c9ee6e 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 <T> void checkSingleFieldValues(Map<String,T> expected, Map<String,T>
found, Set<String> missing) {


Mime
View raw message