Repository navigation
fix(engine): correct Surefire discovery regex filters - #3821
Merged
Merged
Conversation
Collaborator
Author
|
fyi, currently under maintainer discussion: should we downgrade to Sunfire 3.5.6 and upgrade to 3.6.1 once it is released or apply mitigation to the regression |
This was referenced Oct 9, 2026
hauptmedia
marked this pull request as ready for review
October 11, 2026 15:28
hauptmedia
marked this pull request as draft
October 11, 2026 15:31
hauptmedia
force-pushed
the
fix/engine-test-discovery
branch
from
October 11, 2026 15:31
e0fde14 to
e0edf5a
Compare
hauptmedia
marked this pull request as ready for review
October 11, 2026 15:37
hauptmedia
marked this pull request as draft
October 11, 2026 15:50
hauptmedia
marked this pull request as ready for review
October 11, 2026 15:54
Contributor
|
The test failures need to be fixed first. Good that this fix uncovers them! |
kthoms
force-pushed
the
fix/engine-test-discovery
branch
from
October 12, 2026 14:08
e0edf5a to
7f47e56
Compare
Contributor
|
The fix is valid. We can stay with 3.6.0 with it. Also no need to change anything when 3.6.1 is released. |
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Surefire 3.6.0 reapplies regex filters to JUnit class names without the
.classsuffix. The engine's suffix-bearing expressions therefore silently omit intended tests during ordinary Maven builds.Fix
Remove the trailing
.classfrom both regex expressions inengine/pom.xmland add a two-line compatibility comment. Category profiles, custom includes/excludes, TestCase/Nashorn exclusions and ArchUnit dependency scanning remain intact.One commit, one file, +4/-2 against main. No engine runtime or test source changes.
Verification
Head:
e0edf5a5748cb905ce77f3e6d1cbdce986e62d71. Base:ce6e96e4139a006bb3ba6a3fce70f80eb3641f5c.Local checks
JDK 21.0.12.1, Maven 3.10.0, Surefire 3.6.0 and H2; build cache disabled.
-Dtestwas used for discovery verification. ArchUnit stayed enabled and passed in default/complement runs.git diff --checkpassed. Root-scoped cleanup exited zero without tracked changes, but emitted recipe-validation/frontend parsing errors; a clean cleanup pass is not claimed.CI result and discovery coverage
PR Build #555 completed with failure on this head. CI used JDK 17.0.20.1 and the normal build profile with H2 and the default engine filters.
The engine completed its test phase and reported ordinary test failures; there was no engine fork-abort/OOM reported. Its tests executed in this run rather than being restored as cached results.
An independent JUnit discovery plan from the final sources, using the effective POM and Surefire's actual scanner/provider filters, contains 1,521 scan candidates and 1,098 class containers. The corrected provider's full descriptor set equals the scanner-only oracle. The CI log contains exactly those 1,098 class containers, once each, with no missing or unexpected classes. All 936 classes omitted by the unmodified-main provider filters are represented.
CI also confirms
ClassNameUtilTest(7 cases),MailActivityBehaviorTest(24), both engine-retention nested tests (1 each), and ArchUnit (1), all successful. Seven nested class containers are represented: 10 passing cases and one skip. Three enclosing containers have no direct cases. The 87 skipped cases occur across 48 class summaries. Scanner TestCase/Nashorn exclusions remain intentional; selected nested classes can legitimately bring their enclosing container into the JUnit plan.Limit: this establishes class-level discovery coverage, not a complete identity-by-identity proof for every parameterized/dynamic invocation. The uploaded Surefire report archive exists, and report publication/upload succeeded, but local retrieval of its bytes is blocked by the execution environment's download proxy (HTTP 403). Therefore all individual testcase identities and skip reasons could not be audited from CI XML. No unconditional “every testcase verified” claim is made.
Only this default engine CI selection ran; there are no matrix repetitions added to the count. Frontend and PR configuration passed. Static analysis, Spring Boot Starter integration, Quarkus and integration-test jobs were skipped; their coverage is not established.
Existing main failures
All 45 failing CI invocations were independently reproduced on a tracked tree verified identical to unmodified main. The targeted baseline selected the 41 failing methods, expanding to 52 invocations: 14 failures, 31 errors and 7 passes. The 45 failing identities, including parameter indices, result kinds and exception types match CI exactly. This reproduction used
-Dtestonly to bypass main's broken discovery, not as coverage evidence.For example, the normal
test.includes=api.externaltask.SetExternalTasksRetriesfilter runs zero cases on main. With this fix it executes 24 cases, including two existing null-ID assertion failures; explicit baseline selection reproduces the same 24 identities/outcomes.These failures are existing main behavior exposed by restored discovery. No engine fixes are included, and the full PR pipeline is not green.