-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark JUnit 5 setup and teardown action spans as failed if there is an…
… error (#8033)
- Loading branch information
1 parent
1ef67e5
commit 3ad344d
Showing
17 changed files
with
985 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ent/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterAll.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.example; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.AfterAll; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TestFailedAfterAll { | ||
|
||
@AfterAll | ||
public static void tearDown() { | ||
throw new RuntimeException("suite teardown failed"); | ||
} | ||
|
||
@Test | ||
public void test_succeed() { | ||
assertTrue(true); | ||
} | ||
|
||
@Test | ||
public void another_test_succeed() { | ||
assertTrue(true); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...nt/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedAfterEach.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.example; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TestFailedAfterEach { | ||
|
||
@AfterEach | ||
public void tearDown() { | ||
throw new RuntimeException("testcase teardown failed"); | ||
} | ||
|
||
@Test | ||
public void test_succeed() { | ||
assertTrue(true); | ||
} | ||
|
||
@Test | ||
public void another_test_succeed() { | ||
assertTrue(true); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...nt/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeAll.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.example; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TestFailedBeforeAll { | ||
|
||
@BeforeAll | ||
public static void setUp() { | ||
throw new RuntimeException("suite setup failed"); | ||
} | ||
|
||
@Test | ||
public void test_succeed() { | ||
assertTrue(true); | ||
} | ||
|
||
@Test | ||
public void another_test_succeed() { | ||
assertTrue(true); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...t/instrumentation/junit-5.3/junit-5.8/src/test/java/org/example/TestFailedBeforeEach.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.example; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TestFailedBeforeEach { | ||
|
||
@BeforeEach | ||
public void setUp() { | ||
throw new RuntimeException("testcase setup failed"); | ||
} | ||
|
||
@Test | ||
public void test_succeed() { | ||
assertTrue(true); | ||
} | ||
|
||
@Test | ||
public void another_test_succeed() { | ||
assertTrue(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...nstrumentation/junit-5.3/junit-5.8/src/test/resources/test-failed-after-all/coverages.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ ] |
Oops, something went wrong.