You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/05/08 18:40:35 UTC

[lucene-solr] branch branch_8x updated: SOLR-12833: prevent NPE in DistributedUpdateProcessorTest AfterClass when mockito assumption fails in BeforeClass

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch_8x by this push:
     new eed9657  SOLR-12833: prevent NPE in DistributedUpdateProcessorTest AfterClass when mockito assumption fails in BeforeClass
eed9657 is described below

commit eed96570aa19c20304daafba403980b62445b964
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Wed May 8 11:35:14 2019 -0700

    SOLR-12833: prevent NPE in DistributedUpdateProcessorTest AfterClass when mockito assumption fails in BeforeClass
    
    (cherry picked from commit cde00b9a84f3d57252d34daaa77f2b56cf9802cb)
---
 .../apache/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 d633ec6..09fe521 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");
   }