lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <dawid.we...@cs.put.poznan.pl>
Subject Re: Typo in test framework
Date Tue, 12 Jun 2012 18:20:59 GMT
Hi Shai.

I think this question may be of relevance to others, so I allowed
myself to CC the list. So:

> I see these printed when I run test-core:
>
>  [junit4] IGNOR/A 0.00s | Test10KPulsings.test10kNotPulsed
>  [junit4]    > Assumption #1: 'nightly' test group is disabled (@Nightly)
>
> Is IGNOR a typo? Or is it a weird locale?

JUnit has the notion of "ignored" test (marked with @Ignore) or
"assumption-ignored" test which is physically executed but at some
point ends with an AssumptionViolatedException:

https://github.com/KentBeck/junit/blob/master/src/main/java/org/junit/internal/AssumptionViolatedException.java

The primary distinction is that the test can evaluate a condition and
decide to throw an assumption while @Ignore is unconditional. There
are also other technical side-effects -- listeners do get informed
about the cause of an assumption (an instance of the thrown exception)
while they are not informed about any cause of the ignored test (I
think because it was at some point assumed that tests can only be
ignored for one reason -- @Ignore annotation). Assumption-ignore
exceptions can happen simultaneously with other exceptions resulting
from rules -- the behavior then is not clearly defined...

Randomizedtesting's <junit4> task tries hard to report all the events
that really happened and report them -- including assumption-failed
tests. So IGNOR/A is an assumption-ignored test (as opposed to IGNORED
which is a test ignored for other reasons).

Hope this helps,

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message