From 84005ad61f4c2e3f5e54b5f5e9577868f6afef6c Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Fri, 18 Dec 2015 19:02:30 +0000 Subject: [PATCH] SOLR-8279: One of two tests was not calling TestInjection#clear after using it. Call clear in the Solr base test class instead. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1720841 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/org/apache/solr/cloud/RestartWhileUpdatingTest.java | 1 - .../test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java b/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java index f681c527d06..cde4ee7aaa8 100644 --- a/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java @@ -74,7 +74,6 @@ public class RestartWhileUpdatingTest extends AbstractFullDistribZkTestBase { System.clearProperty("leaderVoteWait"); System.clearProperty("solr.autoCommit.maxTime"); System.clearProperty("solr.autoSoftCommit.maxTime"); - TestInjection.reset(); } @Test diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java index 94e8d5f84c6..d94e88654d7 100644 --- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java @@ -92,6 +92,7 @@ import org.apache.solr.util.RefCounted; import org.apache.solr.util.RevertDefaultThreadHandlerRule; import org.apache.solr.util.SSLTestConfig; import org.apache.solr.util.TestHarness; +import org.apache.solr.util.TestInjection; import org.apache.zookeeper.KeeperException; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -240,6 +241,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { coreName = DEFAULT_TEST_CORENAME; } finally { ObjectReleaseTracker.clear(); + TestInjection.reset(); initCoreDataDir = null; System.clearProperty("zookeeper.forceSync"); System.clearProperty("jetty.testMode");