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/02/28 22:21:40 UTC

[lucene-solr] branch master updated: fix AfterClass in OverseerTest to not fail with NPE if assumeWorkingMockito() call short circuited the BeforeClass

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

hossman 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 5e28e94  fix AfterClass in OverseerTest to not fail with NPE if assumeWorkingMockito() call short circuited the BeforeClass
5e28e94 is described below

commit 5e28e94a930348c1ec8523cacdd57bb0842accf3
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Thu Feb 28 15:17:12 2019 -0700

    fix AfterClass in OverseerTest to not fail with NPE if assumeWorkingMockito() call short circuited the BeforeClass
---
 solr/core/src/test/org/apache/solr/cloud/OverseerTest.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
index 708016e..82938a0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
@@ -304,10 +304,15 @@ public class OverseerTest extends SolrTestCaseJ4 {
   
   @AfterClass
   public static void afterClass() throws Exception {
-    zkClient.printLayoutToStdOut();
-    server.shutdown();
+    if (null != zkClient) {
+      zkClient.printLayoutToStdOut();
+    }
+    
     System.clearProperty("solr.zkclienttimeout");
     
+    if (null != server) {
+      server.shutdown();
+    }
   }
   
   @After