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 Group-ignored tests and @Before/After class hooks.
Date Fri, 07 Mar 2014 10:17:47 GMT
Robert pointed out this:

>  [junit4] Suite: org.apache.solr.cloud.BasicZkTest
>  [junit4] IGNOR/A 0.00s J2 | BasicZkTest.testBasic
>  [junit4]    > Assumption #1: 'slow' test group is disabled (@Slow)
>  [junit4] Completed on J2 in 42.45s, 1 test, 1 skipped
>
> Bug? Like it must be running @BeforeClass etc even though no tests are enabled...

Indeed, this is currently the case. The problem is that the way JUnit
works (or rather: the various tooling environments expects it to work)
one has a choice of:

1) ignoring/ filtering certain tests or classes; then they will not
show up in IDEs at all,

2) ignoring/ filtering certain tests *at evaluation time*; this
unfortunately means @BeforeClass and @AfterClass will run (and so will
static class initializers). This has the benefit that all ignored
methods are reported properly.

I'll see what I can do about it but it's not a trivial bug/ change.

Dawid

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


Mime
View raw message