mirror of
https://github.com/rtk-ai/rtk.git
synced 2026-09-19 07:33:17 +08:00
1050cfeadc
Surefire 3.x emits one blank-separated detail block per failing test under a single class close line. The trail previously ended at the first blank line and never re-armed, so failures after the first lost their exception message (unindented -> dropped) and leaked the full junit/jdk framework stack (indented -> kept by keep_continuation). SurefireBlock now remembers the trail's keep/drop decision when it ends at a blank line (trail_rearm) and re-enters the trail on the next per-test subline with the same decision — a capped class drops all its per-test blocks, not just the first. Any other non-blank line disarms re-entry; RUNNING/commit/drop clear it so an unrelated class can never inherit the decision. Extra blanks between per-test blocks stay armed. Per-test sublines use '<<< ERROR!' for thrown (non-assertion) exceptions — accept both markers via a shared is_per_test_subline() (also reused by filter_quiet, which already re-armed correctly), and widen the CLOSE regex to tolerate an ERROR! marker defensively (Surefire 3.5.5 emits FAILURE! even for errors-only classes, per the fixture capture; detection keys off the counts, not the marker). Fixture captured from real Maven 3.9.9 / Surefire 3.5.5 output against the new tests/fixtures/multifail-skeleton/ (CalcTest: assertion failure + thrown exception in one class; BoomTest: errors-only class). A byte-exact pin locks the single-failure path unchanged.
31 lines
934 B
XML
31 lines
934 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>com.example.rtk</groupId>
|
|
<artifactId>multifail-skeleton</artifactId>
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
<packaging>jar</packaging>
|
|
<properties>
|
|
<maven.compiler.source>21</maven.compiler.source>
|
|
<maven.compiler.target>21</maven.compiler.target>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<version>5.11.4</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.5.5</version>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|