Apache Solr open-source search software
SOLR-16043: Simplify HDFS tests
Kevin Risden10cc0c01aa3f
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 00346ad76af..87b94dc7b79 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -616,6 +616,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.javaindex 91f9ca3531f..4a5705d19a7 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 {