Skip to content

Commit 1b5a33e

Browse files
committed
Add before/after in comment
1 parent d904031 commit 1b5a33e

1 file changed

Lines changed: 29 additions & 14 deletions

File tree

.gitlab/TagInitializationErrors.java

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,35 @@
1010
import java.util.List;
1111
import java.util.Map;
1212

13-
/**
14-
* Tags intermediate {@code initializationError} retries with {@code dd_tags[test.final_status]=skip}.
15-
*
16-
* <p>Gradle generates synthetic "initializationError" testcases in JUnit reports for setup methods.
17-
* When a setup is retried and eventually succeeds, multiple testcases are created, with only the
18-
* last one passing. All intermediate attempts are marked skip so Test Optimization is not misled.
19-
*
20-
* <p>For any suite with multiple {@code initializationError} test cases (when retries occurred), all entries
21-
* but the last one are tagged by this script with `dd_tags[test.final_status]=skip`. The last
22-
* entry is left unmodified, allowing <em>Test Optimization</em> to apply its default status inference based
23-
* on the actual outcome. Files with only one (or zero) {@code initializationError} test cases are left unmodified.
24-
*
25-
* <p>Usage (Java 25): {@code java TagInitializationErrors.java junit-report.xml}
26-
*/
13+
/// Tags intermediate `initializationError` retries with `dd_tags[test.final_status]=skip`.
14+
///
15+
/// Gradle generates synthetic "initializationError" testcases in JUnit reports for setup methods.
16+
/// When a setup is retried and eventually succeeds, multiple testcases are created, with only the
17+
/// last one passing. All intermediate attempts are marked skip so Test Optimization is not misled.
18+
///
19+
/// For any suite with multiple `initializationError` test cases (when retries occurred), all entries
20+
/// but the last one are tagged by this script with `dd_tags[test.final_status]=skip`. The last
21+
/// entry is left unmodified, allowing **Test Optimization** to apply its default status inference based
22+
/// on the actual outcome. Files with only one (or zero) `initializationError` test cases are left unmodified.
23+
///
24+
/// Before:
25+
///
26+
/// ```
27+
/// <testcase name="initializationError" />
28+
/// ```
29+
///
30+
/// After:
31+
///
32+
/// ```
33+
/// <testcase name="initializationError">
34+
/// <properties>
35+
/// <property name="dd_tags[test.final_status]" value="skip" />
36+
/// </properties>
37+
/// </testcase>
38+
/// ```
39+
///
40+
/// Usage (Java 25): `java TagInitializationErrors.java junit-report.xml`
41+
2742
class TagInitializationErrors {
2843
public static void main(String[] args) throws Exception {
2944
if (args.length == 0) {

0 commit comments

Comments
 (0)