From 43d88deabf8f6d86067cc0e3e0b92698a60c936a Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Mon, 4 Mar 2024 15:30:34 -0500 Subject: [PATCH] eradicate the configsetsDir parameter as we dont' need it. --- .../apache/solr/cloud/SolrCLIZkUtilsTest.java | 22 +++---------------- .../solr/cloud/AbstractDistribZkTestBase.java | 7 +++--- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java b/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java index 8dde138f439..8c4e018ac0a 100644 --- a/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java @@ -87,16 +87,10 @@ public void testUpconfig() throws Exception { // Now just use a name in the configsets directory, do we find it? configSet = TEST_PATH().resolve("configsets"); + File confDir = new File(configSet.toFile(), "cloud-subdirs"); String[] args = new String[] { - "--confname", - "upconfig2", - "--confdir", - "cloud-subdirs", - "--zkHost", - zkAddr, - "--configsetsDir", - configSet.toAbsolutePath().toString(), + "--confname", "upconfig2", "--confdir", confDir.getAbsolutePath(), "--zkHost", zkAddr }; ConfigSetUploadTool tool = new ConfigSetUploadTool(); @@ -107,17 +101,7 @@ public void testUpconfig() throws Exception { verifyZkLocalPathsMatch(srcPathCheck, "/configs/upconfig2"); // do we barf on a bogus path? - args = - new String[] { - "--confname", - "upconfig3", - "--confdir", - "nothinghere", - "--zkHost", - zkAddr, - "--configsetsDir", - configSet.toAbsolutePath().toString(), - }; + args = new String[] {"--confname", "upconfig3", "--confdir", "nothinghere", "--zkHost", zkAddr}; res = tool.runTool(SolrCLI.processCommandLineArgs(tool.getName(), tool.getOptions(), args)); assertTrue("tool should have returned non-zero for failure ", 0 != res); diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java index f91cd6a9a72..d9127525cbf 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java @@ -410,12 +410,13 @@ protected void restartZk(int pauseMillis) throws Exception { protected static void copyConfigUp( Path configSetDir, String srcConfigSet, String dstConfigName, String zkAddr) throws Exception { + + File fullConfDir = new File(configSetDir.toFile(), srcConfigSet); String[] args = new String[] { "-confname", dstConfigName, - "-confdir", srcConfigSet, - "-zkHost", zkAddr, - "--configsets-directory", configSetDir.toString(), + "-confdir", fullConfDir.getAbsolutePath(), + "-zkHost", zkAddr }; ConfigSetUploadTool tool = new ConfigSetUploadTool();