You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/12/07 12:45:28 UTC

[34/50] [abbrv] lucene-solr:jira/solr-11285-sim: tests: raise chaosmonkey no stop warn time.

tests: raise chaosmonkey no stop warn time.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5440d925
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5440d925
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5440d925

Branch: refs/heads/jira/solr-11285-sim
Commit: 5440d925d389adadb13eb7a9ed28ce9af5a16a28
Parents: a8a6346
Author: Mark Miller <ma...@apache.org>
Authored: Wed Dec 6 09:24:05 2017 -0600
Committer: Mark Miller <ma...@apache.org>
Committed: Wed Dec 6 09:24:05 2017 -0600

----------------------------------------------------------------------
 .../src/java/org/apache/solr/cloud/ChaosMonkey.java             | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5440d925/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java
----------------------------------------------------------------------
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 86f8906..b8873fa 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
@@ -62,6 +62,7 @@ import org.slf4j.LoggerFactory;
 public class ChaosMonkey {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   
+  private static final int NO_STOP_WARN_TIME = 60;
   private static final int CONLOSS_PERCENT = 10; // 0 - 10 = 0 - 100%
   private static final int EXPIRE_PERCENT = 10; // 0 - 10 = 0 - 100%
   private Map<String,List<CloudJettyRunner>> shardToJetty;
@@ -583,8 +584,8 @@ public class ChaosMonkey {
     DirectUpdateHandler2.commitOnClose = true;
 
     double runtime = runTimer.getTime()/1000.0f;
-    if (runtime > 45 && stops.get() == 0) {
-      LuceneTestCase.fail("The Monkey ran for over 45 seconds and no jetties were stopped - this is worth investigating!");
+    if (runtime > NO_STOP_WARN_TIME && stops.get() == 0) {
+      LuceneTestCase.fail("The Monkey ran for over " + NO_STOP_WARN_TIME +" seconds and no jetties were stopped - this is worth investigating!");
     }
   }