lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r927637 - in /lucene/dev/trunk/solr/src/test/org/apache/solr: SolrTestCaseJ4.java client/solrj/embedded/SolrExampleEmbeddedTest.java
Date Thu, 25 Mar 2010 23:23:11 GMT
Author: yonik
Date: Thu Mar 25 23:23:11 2010
New Revision: 927637

URL: http://svn.apache.org/viewvc?rev=927637&view=rev
Log:
fix setting of solr.solr.home

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

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/SolrTestCaseJ4.java?rev=927637&r1=927636&r2=927637&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/SolrTestCaseJ4.java Thu Mar 25 23:23:11
2010
@@ -77,9 +77,17 @@ public class SolrTestCaseJ4 extends Luce
   /** Call initCore in @BeforeClass to instantiate a solr core in your test class.
    * deleteCore will be called for you via SolrTestCaseJ4 @AfterClass */
   public static void initCore(String config, String schema) throws Exception {
-    //ignoreException("ignore_exception");
+    initCore(config, schema, null);
+  }
+
+  /** Call initCore in @BeforeClass to instantiate a solr core in your test class.
+   * deleteCore will be called for you via SolrTestCaseJ4 @AfterClass */
+  public static void initCore(String config, String schema, String solrHome) throws Exception
{
     configString = config;
     schemaString = schema;
+    if (solrHome != null) {
+      System.setProperty("solr.solr.home", solrHome);
+    }
     initCore();
   }
 

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java?rev=927637&r1=927636&r2=927637&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java
(original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java
Thu Mar 25 23:23:11 2010
@@ -31,7 +31,7 @@ public class SolrExampleEmbeddedTest ext
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    initCore(EXAMPLE_CONFIG, EXAMPLE_SCHEMA);
+    initCore(EXAMPLE_CONFIG, EXAMPLE_SCHEMA, EXAMPLE_HOME);
   }
 
   @Override



Mime
View raw message