mirror of https://github.com/apache/lucene.git
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:
parent
30e17530de
commit
6407d49ae3
|
@ -20,21 +20,26 @@ package org.apache.lucene.util;
|
||||||
import org.apache.lucene.util.junitcompat.WithNestedTests;
|
import org.apache.lucene.util.junitcompat.WithNestedTests;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.JUnitCore;
|
import org.junit.runner.JUnitCore;
|
||||||
import org.junit.runner.Result;
|
import org.junit.runner.Result;
|
||||||
import org.junit.runner.notification.Failure;
|
import org.junit.runner.notification.Failure;
|
||||||
import org.junit.runner.notification.RunListener;
|
import org.junit.runner.notification.RunListener;
|
||||||
|
|
||||||
|
import com.carrotsearch.randomizedtesting.SysGlobals;
|
||||||
import com.carrotsearch.randomizedtesting.annotations.Repeat;
|
import com.carrotsearch.randomizedtesting.annotations.Repeat;
|
||||||
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule;
|
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule;
|
||||||
|
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see TestRuleIgnoreAfterMaxFailures
|
* @see TestRuleIgnoreAfterMaxFailures
|
||||||
* @see SystemPropertiesInvariantRule
|
* @see SystemPropertiesInvariantRule
|
||||||
*/
|
*/
|
||||||
@Ignore("DW: Check why this test doesn't pass from time to time.")
|
|
||||||
public class TestMaxFailuresRule extends WithNestedTests {
|
public class TestMaxFailuresRule extends WithNestedTests {
|
||||||
|
@Rule
|
||||||
|
public SystemPropertiesRestoreRule restoreSysProps = new SystemPropertiesRestoreRule();
|
||||||
|
|
||||||
public TestMaxFailuresRule() {
|
public TestMaxFailuresRule() {
|
||||||
super(true);
|
super(true);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +55,7 @@ public class TestMaxFailuresRule extends WithNestedTests {
|
||||||
public void testMaxFailures() {
|
public void testMaxFailures() {
|
||||||
int maxFailures = LuceneTestCase.ignoreAfterMaxFailures.maxFailures;
|
int maxFailures = LuceneTestCase.ignoreAfterMaxFailures.maxFailures;
|
||||||
int failuresSoFar = LuceneTestCase.ignoreAfterMaxFailures.failuresSoFar;
|
int failuresSoFar = LuceneTestCase.ignoreAfterMaxFailures.failuresSoFar;
|
||||||
|
System.clearProperty(SysGlobals.SYSPROP_ITERATIONS());
|
||||||
try {
|
try {
|
||||||
LuceneTestCase.ignoreAfterMaxFailures.maxFailures = 2;
|
LuceneTestCase.ignoreAfterMaxFailures.maxFailures = 2;
|
||||||
LuceneTestCase.ignoreAfterMaxFailures.failuresSoFar = 0;
|
LuceneTestCase.ignoreAfterMaxFailures.failuresSoFar = 0;
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class TestSameRandomnessLocalePassedOrNot extends WithNestedTests {
|
||||||
RuleChain.outerRule(new SystemPropertiesRestoreRule());
|
RuleChain.outerRule(new SystemPropertiesRestoreRule());
|
||||||
|
|
||||||
public TestSameRandomnessLocalePassedOrNot() {
|
public TestSameRandomnessLocalePassedOrNot() {
|
||||||
super(false);
|
super(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Nested extends WithNestedTests.AbstractNestedTest {
|
public static class Nested extends WithNestedTests.AbstractNestedTest {
|
||||||
|
|
Loading…
Reference in New Issue