From 15bf918824b7069b53096575e454574164edae89 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Wed, 26 Dec 2012 04:44:50 +0000 Subject: [PATCH] tests: parameterize git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1425818 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/solr/cloud/ChaosMonkey.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java b/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java index 5ee57b118c4..a4178ca9216 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java @@ -56,6 +56,9 @@ public class ChaosMonkey { private static final int EXPIRE_PERCENT = 10; // 0 - 10 = 0 - 100% private Map> shardToJetty; + private static final boolean CONN_LOSS = Boolean.valueOf(System.getProperty("solr.tests.cloud.cm.connloss", "true")); + private static final boolean EXP = Boolean.valueOf(System.getProperty("solr.tests.cloud.cm.exp", "true")); + private ZkTestServer zkServer; private ZkStateReader zkStateReader; private String collection; @@ -83,9 +86,9 @@ public class ChaosMonkey { this.zkStateReader = zkStateReader; this.collection = collection; Random random = LuceneTestCase.random(); - expireSessions = true; //= random.nextBoolean(); + expireSessions = EXP; //= random.nextBoolean(); - causeConnectionLoss = true;//= random.nextBoolean(); + causeConnectionLoss = CONN_LOSS;//= random.nextBoolean(); monkeyLog("init - expire sessions:" + expireSessions + " cause connection loss:" + causeConnectionLoss); }