Thanks Dawid. It's not critical to change this setting and i don't want to
override it by default when running tests, only if I use tests.iters.
While we could make LTC default maxFailures to 1 if tests.iters are >1, I
don't think that it's worth it. I'll just type -Dtests.failfast=true.

Anyway, since then I was able to run luceneutil/repeatLuceneTest.py which
does the combination of tests.iters and tests.dups (which is what I wished
-Dtests.dups, or -Dtests.beast would do). So far it's been working great.


Shai


On Sun, May 12, 2013 at 9:15 PM, Dawid Weiss
<[email protected]>wrote:

> > OnI think that in general the code that initializes
> ignoreAfterMaxFailures should take tests.iters into account?
> > I.e. what's the point of running a test with maxfailures=5 or
> failfast=true without iters?
>
> I looked at the code. The thing is one of these options (failfast?) is
> I think a "legacy" thing; maxfailures takes precedence over this
> property. When you look at the LTC this is indeed the case
>
>     if (failFast) {
>       if (maxFailures == Integer.MAX_VALUE) {
>         maxFailures = 1;
>       } else {
>         Logger.getLogger(LuceneTestCase.class.getSimpleName()).warning(
>             "Property '" + SYSPROP_MAXFAILURES + "'=" + maxFailures +
> ", 'failfast' is" +
>             " ignored.");
>       }
>     }
>
> So if failfast is specified it effectively means the same as
> specifying maxFailures=1, otherwise a warning is printed about
> incompatible combination of options. I think we should keep this
> behavior -- people may be used to this.
>
> The implementation of maxfailures is JVM-local and indeed is meant
> primarily to early-exit (ignore) any tests after the first N failures.
> This includes the scenario with multiple test repetitions but was
> designed for the general case, not this particular use case. The
> default behavior in ANT's JUnit (and in maven too) is to execute all
> tests, not to stop on the first error. Again, I think we should keep
> this behavior consistent. If you wish to alter it locally on a
> persistent basis then how about if you create your own setup in:
>
> <property file="${user.home}/lucene.build.properties"/>
>
> As for tests failing when failfast is set to true -- this is indeed a
> bug in tests (they shouldn't be sensitive to this but they are). I
> filed this issue to fix this:
>
> https://issues.apache.org/jira/browse/LUCENE-4997
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to