LUCENE-4160: don't take into account global tests.iters in this test.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1355669 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dawid Weiss 2012-06-30 09:01:07 +00:00
parent 30e17530de
commit 6407d49ae3
2 changed files with 8 additions and 2 deletions

View File

@ -20,21 +20,26 @@ package org.apache.lucene.util;
import org.apache.lucene.util.junitcompat.WithNestedTests;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunListener;
import com.carrotsearch.randomizedtesting.SysGlobals;
import com.carrotsearch.randomizedtesting.annotations.Repeat;
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule;
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
/**
* @see TestRuleIgnoreAfterMaxFailures
* @see SystemPropertiesInvariantRule
*/
@Ignore("DW: Check why this test doesn't pass from time to time.")
public class TestMaxFailuresRule extends WithNestedTests {
@Rule
public SystemPropertiesRestoreRule restoreSysProps = new SystemPropertiesRestoreRule();
public TestMaxFailuresRule() {
super(true);
}
@ -50,6 +55,7 @@ public class TestMaxFailuresRule extends WithNestedTests {
public void testMaxFailures() {
int maxFailures = LuceneTestCase.ignoreAfterMaxFailures.maxFailures;
int failuresSoFar = LuceneTestCase.ignoreAfterMaxFailures.failuresSoFar;
System.clearProperty(SysGlobals.SYSPROP_ITERATIONS());
try {
LuceneTestCase.ignoreAfterMaxFailures.maxFailures = 2;
LuceneTestCase.ignoreAfterMaxFailures.failuresSoFar = 0;

View File

@ -39,7 +39,7 @@ public class TestSameRandomnessLocalePassedOrNot extends WithNestedTests {
RuleChain.outerRule(new SystemPropertiesRestoreRule());
public TestSameRandomnessLocalePassedOrNot() {
super(false);
super(true);
}
public static class Nested extends WithNestedTests.AbstractNestedTest {