> 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