mirror of https://github.com/apache/lucene.git
SOLR-12072: Invalid path string using ZkConfigManager.copyConfigDir(String fromConfig, String toConfig)
This commit is contained in:
parent
dae572819b
commit
7dfb04ee5e
|
@ -261,6 +261,9 @@ Bug Fixes
|
||||||
in normalization instead of all. This bug normally doesn't matter since TextField doesn't call it.
|
in normalization instead of all. This bug normally doesn't matter since TextField doesn't call it.
|
||||||
(Tim Allison via David Smiley)
|
(Tim Allison via David Smiley)
|
||||||
|
|
||||||
|
* SOLR-12072: Invalid path string using ZkConfigManager.copyConfigDir(String fromConfig, String toConfig)
|
||||||
|
(Alessandro Hoss via Erick Erickson)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class ZkConfigManager {
|
||||||
* @throws IOException if an I/O error occurs
|
* @throws IOException if an I/O error occurs
|
||||||
*/
|
*/
|
||||||
public void copyConfigDir(String fromConfig, String toConfig) throws IOException {
|
public void copyConfigDir(String fromConfig, String toConfig) throws IOException {
|
||||||
copyConfigDir(CONFIGS_ZKNODE + "/" + fromConfig, CONFIGS_ZKNODE + "/" + toConfig, null);
|
copyConfigDir(fromConfig, toConfig, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -115,6 +115,13 @@ public class TestZkConfigManager extends SolrTestCaseJ4 {
|
||||||
// uploading same files to a new name creates a new config
|
// uploading same files to a new name creates a new config
|
||||||
configManager.uploadConfigDir(tempConfig, "config2");
|
configManager.uploadConfigDir(tempConfig, "config2");
|
||||||
assertEquals(2, configManager.listConfigs().size());
|
assertEquals(2, configManager.listConfigs().size());
|
||||||
|
|
||||||
|
// Test copying a config works in both flavors
|
||||||
|
configManager.copyConfigDir("config2", "config2copy");
|
||||||
|
configManager.copyConfigDir("config2", "config2copy2", null);
|
||||||
|
configs = configManager.listConfigs();
|
||||||
|
assertTrue("config2copy should exist", configs.contains("config2copy"));
|
||||||
|
assertTrue("config2copy2 should exist", configs.contains("config2copy2"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue