mirror of https://github.com/apache/lucene.git
use random tmp data dir for more tests
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@926776 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
234c46008a
commit
32a370e127
|
@ -42,7 +42,7 @@ abstract public class SolrExampleTestBase extends AbstractSolrTestCase
|
||||||
|
|
||||||
// this sets the property for jetty starting SolrDispatchFilter
|
// this sets the property for jetty starting SolrDispatchFilter
|
||||||
System.setProperty( "solr.solr.home", this.getSolrHome() );
|
System.setProperty( "solr.solr.home", this.getSolrHome() );
|
||||||
System.setProperty( "solr.data.dir", "./solr/data" );
|
System.setProperty( "solr.data.dir", this.dataDir.getCanonicalPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package org.apache.solr.client.solrj.embedded;
|
package org.apache.solr.client.solrj.embedded;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
@ -42,7 +43,12 @@ public class JettyWebappTest extends TestCase
|
||||||
public void setUp() throws Exception
|
public void setUp() throws Exception
|
||||||
{
|
{
|
||||||
System.setProperty("solr.solr.home", "../../../example/solr");
|
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";
|
String path = "../../webapp/web";
|
||||||
|
|
||||||
server = new Server(port);
|
server = new Server(port);
|
||||||
|
|
Loading…
Reference in New Issue