Skip to content

Commit

Permalink
eradicate the configsetsDir parameter as we dont' need it.
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Mar 4, 2024
1 parent 2bd018c commit 43d88de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
22 changes: 3 additions & 19 deletions solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 43d88de

Please sign in to comment.