https://issues.apache.org/bugzilla/show_bug.cgi?id=55227
Bug ID: 55227
Summary: [PATCH] JUnit Ignore annotation is ignored as of
revision 953761
Product: Ant
Version: 1.9.1
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P2
Component: Optional Tasks
Assignee: [email protected]
Reporter: [email protected]
Created attachment 30573
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30573&action=edit
Patch to fix with unit test.
I found a regression when moving from Ant 1.7.1 to 1.9.1.
It is common for people with existing JUnit 3 tests to start using JUnit 4
annotations on them. Once such test uses the @Ignore annotation on the entire
test. Ant 1.7.1 correctly ignores the test class, but 1.9.1 incorrectly runs
the class.
I tracked this down to a change done with revision 953761 where, "You can now
specify a list of methods to run in a JUnit test case."
Line 408 of the JUnitTestRunner (trunk) has the comment:
// Do not use JUnit 4 API for running JUnit 3.x
// tests - it is not able to run individual test
// methods.
However, this would only apply when test methods are specified. If test
methods are not specified, then using the JUNIT_4_TEST_ADAPTER is possible. In
fact, it is preferred since the prior revision used it by default.
A simple patch is attached with a test that will prevent this from happening
again.
--
You are receiving this mail because:
You are the assignee for the bug.