lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r926776 - in /lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj: SolrExampleTestBase.java embedded/JettyWebappTest.java
Date Tue, 23 Mar 2010 20:56:55 GMT
Author: markrmiller
Date: Tue Mar 23 20:56:54 2010
New Revision: 926776

URL: http://svn.apache.org/viewvc?rev=926776&view=rev
Log:
use random tmp data dir for more tests

Modified:
    lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java
    lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java?rev=926776&r1=926775&r2=926776&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java Tue
Mar 23 20:56:54 2010
@@ -42,7 +42,7 @@ abstract public class SolrExampleTestBas
     
     // this sets the property for jetty starting SolrDispatchFilter
     System.setProperty( "solr.solr.home", this.getSolrHome() ); 
-    System.setProperty( "solr.data.dir", "./solr/data" ); 
+    System.setProperty( "solr.data.dir", this.dataDir.getCanonicalPath() ); 
   }
   
   /**

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java?rev=926776&r1=926775&r2=926776&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
(original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
Tue Mar 23 20:56:54 2010
@@ -17,6 +17,7 @@
 
 package org.apache.solr.client.solrj.embedded;
 
+import java.io.File;
 import java.net.URL;
 
 import junit.framework.TestCase;
@@ -42,7 +43,12 @@ public class JettyWebappTest extends Tes
   public void setUp() throws Exception 
   {
     System.setProperty("solr.solr.home", "../../../example/solr");
-    System.setProperty("solr.data.dir", "./solr/data");
+    
+    File dataDir = new File(System.getProperty("java.io.tmpdir")
+        + System.getProperty("file.separator")
+        + getClass().getName() + "-" + System.currentTimeMillis());
+    dataDir.mkdirs();
+    System.setProperty("solr.data.dir", dataDir.getCanonicalPath());
     String path = "../../webapp/web";
 
     server = new Server(port);



Mime
View raw message