lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r1421034 - /lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
Date Wed, 12 Dec 2012 23:02:21 GMT
Author: hossman
Date: Wed Dec 12 23:02:20 2012
New Revision: 1421034

URL: http://svn.apache.org/viewvc?rev=1421034&view=rev
Log:
SOLR-4136: fix hostContext randomization to never include double slashes

Modified:
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1421034&r1=1421033&r2=1421034&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
(original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
Wed Dec 12 23:02:20 2012
@@ -109,9 +109,11 @@ public abstract class BaseDistributedSea
         // 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);
   }
 
   /**



Mime
View raw message