From eed96570aa19c20304daafba403980b62445b964 Mon Sep 17 00:00:00 2001 From: Chris Hostetter Date: Wed, 8 May 2019 11:35:14 -0700 Subject: [PATCH] SOLR-12833: prevent NPE in DistributedUpdateProcessorTest AfterClass when mockito assumption fails in BeforeClass (cherry picked from commit cde00b9a84f3d57252d34daaa77f2b56cf9802cb) --- .../solr/update/processor/DistributedUpdateProcessorTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java index d633ec6867b..09fe5216714 100644 --- a/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java +++ b/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java @@ -65,7 +65,9 @@ public class DistributedUpdateProcessorTest extends SolrTestCaseJ4 { @AfterClass public static void AfterClass() { - executor.shutdown(); + if (null != executor) { // may not have inited due to lack of mockito + executor.shutdown(); + } System.clearProperty("enable.update.log"); }