XN137 commented on PR #3329:
URL: https://github.com/apache/maven-surefire/pull/3329#issuecomment-4141463937
thanks for fixing this!
to add another datapoint:
we are running our tests with
`<rerunFailingTestsCount>3</rerunFailingTestsCount>` and recently added a test
that deterministically fails in the teardown method:
```
@AfterClass
public static void tearDown() throws Exception {
...
}
```
the surefire output looks like this:
```
[2026-03-27T09:10:32.374Z] [WARNING] Flakes:
[2026-03-27T09:10:32.374Z] [WARNING] com.mycompany.MyTestClass.<beforeAll>
[2026-03-27T09:10:32.374Z] [ERROR] Run 1: MyTestClass.tearDown:141 ?
NullPointer
[2026-03-27T09:10:32.374Z] [ERROR] Run 2: MyTestClass.tearDown:141 ?
NullPointer
[2026-03-27T09:10:32.374Z] [ERROR] Run 3: MyTestClass.tearDown:141 ?
NullPointer
[2026-03-27T09:10:32.374Z] [ERROR] Run 4: MyTestClass.tearDown:141 ?
NullPointer
[2026-03-27T09:10:32.374Z] [INFO] Run 5: PASS
[2026-03-27T09:10:32.374Z] [INFO] Run 6: PASS
[2026-03-27T09:10:32.374Z] [INFO] Run 7: PASS
[2026-03-27T09:10:32.374Z] [INFO] Run 8: PASS
[2026-03-27T09:10:32.374Z] [INFO]
[2026-03-27T09:10:32.374Z] [INFO]
[2026-03-27T09:10:32.374Z] [WARNING] Tests run: 6, Failures: 0, Errors: 0,
Skipped: 0, Flakes: 1
```
so no errors are being reported and the jenkins junit report also shows no
problems, but the single test method in the class is reported "passed" 4 times.
since this seems pretty serious, i would kindly ask for a new surefire
release once this fix is in, thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]