mirror of https://github.com/apache/lucene.git
SOLR-5838: Relative SolrHome Path Bug At AbstractFullDistribZkTestBase
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1578089 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e790ae64c0
commit
c446aec1ed
|
@ -238,6 +238,9 @@ Other Changes
|
|||
* SOLR-5853: The createCollection methods in the test framework now reports
|
||||
result of operation in the returned CollectionAdminResponse (janhoy)
|
||||
|
||||
* SOLR-5838: Relative SolrHome Path Bug At AbstractFullDistribZkTestBase.
|
||||
(Furkan KAMACI via shalin)
|
||||
|
||||
================== 4.7.0 ==================
|
||||
|
||||
Versions of Major Components
|
||||
|
|
|
@ -496,9 +496,10 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
String path = SolrResourceLoader.normalizeDir(new File(".").getAbsolutePath());
|
||||
String base = new File(solrHome.getPath()).getAbsolutePath();
|
||||
|
||||
if (base.startsWith("."));
|
||||
base.replaceFirst("\\.", new File(".").getName());
|
||||
|
||||
if (base.startsWith(".")) {
|
||||
base = base.replaceFirst("\\.", new File(".").getName());
|
||||
}
|
||||
|
||||
if (path.endsWith(File.separator + ".")) {
|
||||
path = path.substring(0, path.length() - 2);
|
||||
}
|
||||
|
@ -507,7 +508,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
|
||||
StringBuilder p = new StringBuilder();
|
||||
for (int i = 0; i < splits - 2; i++) {
|
||||
p.append(".." + File.separator);
|
||||
p.append("..").append(File.separator);
|
||||
}
|
||||
|
||||
String prefix = FilenameUtils.getPrefix(path);
|
||||
|
@ -1823,4 +1824,4 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
fail("Could not find the new collection - " + exp.code() + " : " + collectionClient.getBaseURL());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue