You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2010/02/10 19:42:32 UTC
svn commit: r908625 - in
/lucene/solr/branches/cloud/src/test/org/apache/solr/cloud:
AbstractDistributedZkTestCase.java DistributedZkFailuresTest.java
Author: yonik
Date: Wed Feb 10 18:42:08 2010
New Revision: 908625
URL: http://svn.apache.org/viewvc?rev=908625&view=rev
Log:
test needs the embedded core
Modified:
lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/AbstractDistributedZkTestCase.java
lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/DistributedZkFailuresTest.java
Modified: lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/AbstractDistributedZkTestCase.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/AbstractDistributedZkTestCase.java?rev=908625&r1=908624&r2=908625&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/AbstractDistributedZkTestCase.java (original)
+++ lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/AbstractDistributedZkTestCase.java Wed Feb 10 18:42:08 2010
@@ -30,7 +30,9 @@
protected File tmpDir = new File(System.getProperty("java.io.tmpdir")
+ System.getProperty("file.separator") + getClass().getName() + "-"
+ System.currentTimeMillis());
-
+
+ boolean createEmbeddedCore;
+
@Override
public void setUp() throws Exception {
// we don't call super.setUp
@@ -56,16 +58,18 @@
System.setProperty("solr.test.sys.prop1", "propone");
System.setProperty("solr.test.sys.prop2", "proptwo");
+
+ if (createEmbeddedCore) {
CoreContainer.Initializer init = new CoreContainer.Initializer() {
{
this.dataDir = AbstractDistributedZkTestCase.this.dataDir.getAbsolutePath();
this.solrConfigFilename = AbstractDistributedZkTestCase.this.getSolrConfigFilename();
}
};
-
-// h = new TestHarness("", init);
-// lrf = h.getRequestFactory("standard", 0, 20, "version", "2.2");
-
+ h = new TestHarness("", init);
+ lrf = h.getRequestFactory("standard", 0, 20, "version", "2.2");
+ }
+
log.info("####SETUP_END " + getName());
testDir = new File(System.getProperty("java.io.tmpdir")
Modified: lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/DistributedZkFailuresTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/DistributedZkFailuresTest.java?rev=908625&r1=908624&r2=908625&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/DistributedZkFailuresTest.java (original)
+++ lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/DistributedZkFailuresTest.java Wed Feb 10 18:42:08 2010
@@ -64,6 +64,7 @@
@Override
public void setUp() throws Exception {
+ createEmbeddedCore = true;
super.setUp();
jetty = new JettySolrRunner(context, 0, getSolrConfigFilename());