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/01/28 23:28:39 UTC

[lucene-solr] branch master updated: Add logging and impoved cleanup to TestStressCloudBlindAtomicUpdates setup/teardown codepaths that occasionally cause suite level failures in jenkins

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 8bee03f  Add logging and impoved cleanup to TestStressCloudBlindAtomicUpdates setup/teardown codepaths that occasionally cause suite level failures in jenkins
8bee03f is described below

commit 8bee03f49033007102a32449bac0c2ba257443c1
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Mon Jan 28 16:22:28 2019 -0700

    Add logging and impoved cleanup to TestStressCloudBlindAtomicUpdates setup/teardown codepaths that occasionally cause suite level failures in jenkins
    
    The use of closeQuietly should hopefully prevent failures closing one HttpClient from resulting in other client objects being leaked
    
    The setup changes are unlikey to improve test reliability, but will hopefully help diagnose where/how NPEs are coming from that currently cause some suite failures.
---
 .../apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java b/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
index 89c0eaf..7c523b1 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
@@ -17,6 +17,7 @@
 package org.apache.solr.cloud;
 
 import java.lang.invoke.MethodHandles;
+import java.net.URL;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
@@ -136,7 +137,10 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
     waitForRecoveriesToFinish(CLOUD_CLIENT);
 
     for (JettySolrRunner jetty : cluster.getJettySolrRunners()) {
-      CLIENTS.add(getHttpSolrClient(jetty.getBaseUrl() + "/" + COLLECTION_NAME + "/"));
+      assertNotNull("Cluster contains null jetty?", jetty);
+      final URL baseUrl = jetty.getBaseUrl();
+      assertNotNull("Jetty has null baseUrl: " + jetty.toString(), baseUrl);
+      CLIENTS.add(getHttpSolrClient(baseUrl + "/" + COLLECTION_NAME + "/"));
     }
 
     final boolean usingPoints = Boolean.getBoolean(NUMERIC_POINTS_SYSPROP);
@@ -158,7 +162,10 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
     IOUtils.closeQuietly(CLOUD_CLIENT);
     CLOUD_CLIENT = null;
     for (HttpSolrClient client : CLIENTS) {
-      client.close();
+      if (null == client) {
+        log.error("CLIENTS contains a null SolrClient???");
+      }
+      IOUtils.closeQuietly(client);
     }
     CLIENTS = null;
   }