tests: double number of fails that can be seen before failing test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1573322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2014-03-02 16:03:51 +00:00
parent e1f33c6326
commit 3c0c0b4c38
1 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
@Slow @Slow
@ThreadLeakLingering(linger = 60000) @ThreadLeakLingering(linger = 60000)
public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase { public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase {
private static final int FAIL_TOLERANCE = 20;
public static Logger log = LoggerFactory.getLogger(ChaosMonkeyNothingIsSafeTest.class); public static Logger log = LoggerFactory.getLogger(ChaosMonkeyNothingIsSafeTest.class);
private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1")); private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1"));
@ -207,7 +209,7 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase
// we expect full throttle fails, but cloud client should not easily fail // we expect full throttle fails, but cloud client should not easily fail
for (StopableThread indexThread : threads) { for (StopableThread indexThread : threads) {
if (indexThread instanceof StopableIndexingThread && !(indexThread instanceof FullThrottleStopableIndexingThread)) { if (indexThread instanceof StopableIndexingThread && !(indexThread instanceof FullThrottleStopableIndexingThread)) {
assertFalse("There were too many update fails - we expect it can happen, but shouldn't easily", ((StopableIndexingThread) indexThread).getFailCount() > 10); assertFalse("There were too many update fails - we expect it can happen, but shouldn't easily", ((StopableIndexingThread) indexThread).getFailCount() > FAIL_TOLERANCE);
} }
} }