elharo commented on code in PR #3338:
URL: https://github.com/apache/maven-surefire/pull/3338#discussion_r3719860394


##########
surefire-its/src/test/resources/junit4-failing-after-class/src/test/java/junit4/PassingTest.java:
##########
@@ -0,0 +1,16 @@
+package junit4;
+
+import org.junit.Test;
+
+/**
+ * A simple passing test class to verify that other tests are unaffected
+ * by the failing @AfterClass in another test class.
+ */
+public class PassingTest
+{
+    @Test
+    public void testPassingOne()
+    {
+        System.out.println( "testPassingOne passed" );

Review Comment:
   does this actually print when we run the ITs? passing tests should generate 
no output



##########
surefire-its/src/test/resources/junit5-failing-after-all/src/test/java/junit5/PassingTest.java:
##########
@@ -0,0 +1,16 @@
+package junit5;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * A simple passing test class to verify that other tests are unaffected
+ * by the failing @AfterAll in another test class.
+ */
+public class PassingTest
+{
+    @Test
+    public void testPassingOne()
+    {
+        System.out.println( "testPassingOne passed" );

Review Comment:
   no output



##########
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:
   passing tests don't print anything



-- 
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]

Reply via email to