tests: parameterize

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1425815 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-26 04:39:12 +00:00
parent 3a6c519be1
commit a3d1252e7d
2 changed files with 8 additions and 7 deletions

View File

@ -29,7 +29,7 @@
If 'null' (or absent), cores will not be manageable via request handler
-->
<cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}"
hostContext="${hostContext:solr}" zkClientTimeout="30000" numShards="${numShards:3}" shareSchema="${shareSchema:false}"
hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" numShards="${numShards:3}" shareSchema="${shareSchema:false}"
distribUpdateConnTimeout="${distribUpdateConnTimeout:15000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:30000}">
<core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"/>
<shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">

View File

@ -20,6 +20,7 @@ package org.apache.solr.cloud;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.util.LuceneTestCase.BadApple;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.core.SolrCore;
@ -29,12 +30,12 @@ import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
@Ignore("SOLR-3126")
@BadApple
public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase {
private static final int BASE_RUN_LENGTH = 120000;
private static final int RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", Integer.toString(BASE_RUN_LENGTH)));
@BeforeClass
public static void beforeSuperClass() {
@ -66,8 +67,8 @@ public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase {
public ChaosMonkeySafeLeaderTest() {
super();
sliceCount = 3;//atLeast(2);
shardCount = 12;//atLeast(sliceCount*2);
sliceCount = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.slicecount", "3"));
shardCount = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.shardcount", "12"));
}
@Override
@ -91,7 +92,7 @@ public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase {
}
chaosMonkey.startTheMonkey(false, 500);
int runLength = atLeast(BASE_RUN_LENGTH);
int runLength = RUN_LENGTH;
Thread.sleep(runLength);
chaosMonkey.stopTheMonkey();
@ -113,7 +114,7 @@ public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase {
Thread.sleep(2000);
waitForThingsToLevelOut(Integer.MAX_VALUE); //Math.round((runLength / 1000.0f / 3.0f)));
waitForThingsToLevelOut(180000);
checkShardConsistency(true, true);