XN137 commented on code in PR #3338:
URL: https://github.com/apache/maven-surefire/pull/3338#discussion_r3719939605
##########
surefire-its/src/test/resources/junit5-failing-after-all/src/test/java/junit5/AlwaysFailingAfterAllTest.java:
##########
@@ -0,0 +1,29 @@
+package junit5;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test class with @AfterAll that always fails.
+ * All test methods pass, but the class-level teardown always throws.
+ */
+public class AlwaysFailingAfterAllTest
+{
+ @AfterAll
+ static void tearDown()
+ {
+ throw new IllegalStateException( "AfterAll always fails" );
+ }
+
+ @Test
+ public void testOne()
+ {
+ System.out.println( "testOne passed" );
Review Comment:
this is asserted on in the added integration test:
```
outputValidator.assertThatLogLine(containsString("testOne passed"), is(3));
```
proving that passing tests get retried because the class teardown failed
--
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]