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

krisden pushed a commit to branch branch_9_0
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 65bbd98f1e67de22dbfc28ef48ffc3b6a6b1d6c5
Author: Kevin Risden <[email protected]>
AuthorDate: Tue Feb 22 12:39:11 2022 -0500

    SOLR-16043: Simplify HDFS tests
    
    Simplifies HDFS tests by:
    * defaulting to 1 datanode instead of 2
    * Calling only dfsCluster.shutdown(true);
---
 solr/CHANGES.txt                                                    | 2 ++
 .../hdfs/src/test/org/apache/solr/hdfs/cloud/HdfsTestUtil.java      | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ed50b36..0560cc1 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -557,6 +557,8 @@ and each individual module's jar will be included in its 
directory's lib/ folder
 
 * SOLR-16042: Fix TestSolrCloudWithKerberosAlt.testBasics failure due to 
minikdc locale (Kevin Risden)
 
+* SOLR-16043: Fix HDFS tests - "Command processor" thread leak (Mike Drob, 
Kevin Risden)
+
 Bug Fixes
 ---------------------
 * SOLR-15849: Fix the connection reset problem caused by the incorrect use of 
4LW with \n when monitoring zooKeeper status (Fa Ming).
diff --git 
a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/HdfsTestUtil.java 
b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/HdfsTestUtil.java
index 91f9ca3..4a5705d 100644
--- a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/HdfsTestUtil.java
+++ b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/HdfsTestUtil.java
@@ -205,7 +205,7 @@ public class HdfsTestUtil {
       System.setProperty("tests.hdfs.numdatanodes", "1");
     }
 
-    int dataNodes = Integer.getInteger("tests.hdfs.numdatanodes", 2);
+    int dataNodes = Integer.getInteger("tests.hdfs.numdatanodes", 1);
     final MiniDFSCluster.Builder dfsClusterBuilder =
         new MiniDFSCluster.Builder(conf).numDataNodes(dataNodes).format(true);
     if (haTesting) {
@@ -331,15 +331,13 @@ public class HdfsTestUtil {
           }
         }
         try {
-          dfsCluster.getDataNodes().forEach(dataNode -> dataNode.shutdown());
-          dfsCluster.shutdownNameNodes();
           dfsCluster.shutdown(true);
         } catch (Error e) {
           // Added in SOLR-7134
           // Rarely, this can fail to either a NullPointerException
           // or a class not found exception. The later may fixable
           // by adding test dependencies.
-          log.warn("Exception shutting down dfsCluster", e);
+          log.error("Exception shutting down dfsCluster", e);
         }
       }
     } finally {

Reply via email to