Apache Lucene open-source search software
LUCENE-4160: don't take into account global tests.iters in this test.
Dawid Weiss6407d49ae3d7
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestMaxFailuresRule.java b/lucene/core/src/test/org/apache/lucene/util/TestMaxFailuresRule.javaindex 6bdc584b7e9..bd92eae0e2d 100644--- a/lucene/core/src/test/org/apache/lucene/util/TestMaxFailuresRule.java+++ b/lucene/core/src/test/org/apache/lucene/util/TestMaxFailuresRule.java@@ -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;diff --git a/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSameRandomnessLocalePassedOrNot.java b/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSameRandomnessLocalePassedOrNot.javaindex fb703965d13..191348da2fb 100644--- a/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSameRandomnessLocalePassedOrNot.java+++ b/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSameRandomnessLocalePassedOrNot.java@@ -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 {