SOLR-4136: fix hostContext randomization to never include double slashes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1421034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2012-12-12 23:02:20 +00:00
parent a162f36d04
commit 5992a831e4
1 changed files with 4 additions and 2 deletions

View File

@ -109,9 +109,11 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {
// NOOP: don't try to add a subdir to nothing (ie "//" is bad)
}
}
// paranoia, we *really* don't want to ever get "//" in a path...
final String hc = hostContext.toString().replaceAll("\\/+","/");
log.info("Setting hostContext system property: " + hostContext.toString());
System.setProperty("hostContext", hostContext.toString());
log.info("Setting hostContext system property: " + hc);
System.setProperty("hostContext", hc);
}
/**