lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1058394 - in /lucene/dev/branches/branch_3x: ./ lucene/ solr/ solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/DistributedClusteringComponentTest.java solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Date Thu, 13 Jan 2011 02:44:54 GMT
Author: koji
Date: Thu Jan 13 02:44:54 2011
New Revision: 1058394

URL: http://svn.apache.org/viewvc?rev=1058394&view=rev
Log:
SOLR-2282: use solr home properly in the test

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/DistributedClusteringComponentTest.java
    lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java

Modified: lucene/dev/branches/branch_3x/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/DistributedClusteringComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/DistributedClusteringComponentTest.java?rev=1058394&r1=1058393&r2=1058394&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/DistributedClusteringComponentTest.java
(original)
+++ lucene/dev/branches/branch_3x/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/DistributedClusteringComponentTest.java
Thu Jan 13 02:44:54 2011
@@ -27,6 +27,12 @@ public class DistributedClusteringCompon
     BaseDistributedSearchTestCase {
 
   @Override
+  public String getSolrHome() {
+    // TODO: this should work with just "solr-clustering"...
+    return getFile("solr-clustering").getAbsolutePath();
+  }
+
+  @Override
   public void doTest() throws Exception {
     del("*:*");
     int numberOfDocs = 0;

Modified: lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1058394&r1=1058393&r2=1058394&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
(original)
+++ lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Thu Jan 13 02:44:54 2011
@@ -110,12 +110,21 @@ public abstract class BaseDistributedSea
     return randVals;
   }
 
+  /**
+   * Subclasses can override this to change a test's solr home
+   * (default is in test-files)
+   */
+  public String getSolrHome() {
+    return SolrTestCaseJ4.TEST_HOME;
+  }
+  
   @Override
   public void setUp() throws Exception {
     SolrTestCaseJ4.resetExceptionIgnores();  // ignore anything with ignore_exception in
it
     super.setUp();
     System.setProperty("solr.test.sys.prop1", "propone");
     System.setProperty("solr.test.sys.prop2", "proptwo");
+    System.setProperty("solr.solr.home", getSolrHome());
     testDir = new File(TEMP_DIR,
             getClass().getName() + "-" + System.currentTimeMillis());
     testDir.mkdirs();



Mime
View raw message