Return-Path: Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: (qmail 94766 invoked from network); 13 Jan 2011 02:45:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 02:45:25 -0000 Received: (qmail 49655 invoked by uid 500); 13 Jan 2011 02:45:24 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 49646 invoked by uid 99); 13 Jan 2011 02:45:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 02:45:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 02:45:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BCC3023889BF; Thu, 13 Jan 2011 02:44:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@lucene.apache.org From: koji@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110113024454.BCC3023889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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();