You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/03/16 15:46:02 UTC
svn commit: r1578089 - in /lucene/dev/trunk/solr: CHANGES.txt
test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
Author: shalin
Date: Sun Mar 16 14:46:02 2014
New Revision: 1578089
URL: http://svn.apache.org/r1578089
Log:
SOLR-5838: Relative SolrHome Path Bug At AbstractFullDistribZkTestBase
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1578089&r1=1578088&r2=1578089&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sun Mar 16 14:46:02 2014
@@ -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
Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java?rev=1578089&r1=1578088&r2=1578089&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java (original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java Sun Mar 16 14:46:02 2014
@@ -496,9 +496,10 @@ public abstract class AbstractFullDistri
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 AbstractFullDistri
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 AbstractFullDistri
fail("Could not find the new collection - " + exp.code() + " : " + collectionClient.getBaseURL());
}
-}
\ No newline at end of file
+}