fix: pin orbit-aggregation to 4.37.0 to restore test discovery#1323
Merged
joaodinissf merged 3 commits intoMay 6, 2026
Merged
Conversation
4057bb7 to
57eea8e
Compare
Tests have been silently reporting "Tests run: 0" since dsldevkit#1292 (2026-04-01) bumped orbit-aggregation from 2025-09 to 4.39.0. Tycho-Surefire treats zero discovered tests as success, so CI remained green while test coverage dropped to nothing. Root cause: orbit-aggregation 4.38.0+ ships every JUnit Jupiter, Platform, and Vintage IU at both the 5.x and 6.x version families simultaneously. Tycho's planner pulls in both families, so the OSGi runtime ends up with two Class<?> instances of JUnit Platform types, producing LinkageError / ArrayStoreException during test discovery (different classloaders for the same FQN). orbit-aggregation 4.37.0 (Sept 2025) is the last release that ships JUnit at a single family (5.13.4 / Platform 1.13.4) and matches Eclipse 4.34's PDE JUnit runtime bridge. Pinning to it, removing the now-redundant maven-osgi/release/4.39.0 location, and inlining the JUnit IUs at 5.13.4 / 1.13.4 restores the three JUnit-Platform-bearing classloaders to a single agreed version. Also dropped: the unused releases/2022-12 UML2 location, which was a stealth source of additional JUnit 5.9.1 / 1.9.1 IUs (DDK does not consume any UML2 features). Verified locally on macOS aarch64: 307 tests across 75 classes, 0 failures. Tycho-Surefire's auto-detection selects the junit5vintage provider given Jupiter + vintage-engine on the classpath; no providerHint override is needed. This is step 1 of a staged plan. Subsequent PRs will: step 2 - migrate remaining JUnit 4 source surface to Jupiter step 3 - drop org.junit 4.13.2 and junit-vintage-engine entirely step 4 - upgrade to JUnit 6 + Eclipse 4.39 atomically Credit: Kris Limbo's dsldevkit#1320 / dsldevkit#1321 (Plan A / Plan B) proved the JUnit 5 migration direction; both encountered the same LinkageError during diagnosis that this fix sidesteps via version alignment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57eea8e to
289d3f6
Compare
…IfNecessary call XtextBuildTrigger.scheduleFullBuild() invokes buildScheduler.scheduleBuildIfNecessary(projects) - single arg, no IBuildFlag varargs - but the test verified the call with two matchers: eq(projects) and ArgumentMatchers.<IBuildFlag[]>any(). Mockito 5.x treats the second matcher as expecting a second explicit argument, not "varargs may be empty", so verify reports an argument-count mismatch: Wanted: scheduleBuildIfNecessary([], <any>); Actual: scheduleBuildIfNecessary([]); The test passed under Mockito 4.x where vararg `any()` matched zero or more vararg invocations. This isn't introduced by step 1's 5.21->5.19 patch bump; both are strict. Master has had Mockito 5.x in scope since orbit-aggregation 4.39 (PR dsldevkit#1292), but tests being silent-zero (Tycho-Surefire reporting `Tests run: 0` as success) hid the failure. Step 1 restores test discovery, which surfaces this latent mismatch and makes the test fail deterministically (verified locally: 307 tests, 1 failure on this exact assertion). Drop the second matcher on both verify sites (the never() check and the positive verify); they now match the production single-arg call. The IBuildFlag import is no longer needed. Bundled in PR dsldevkit#1323 so its "restored 307 tests" claim lands green; splitting would ship the orbit-pin PR with a known-failing test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
289d3f6 to
02fb8b1
Compare
KrisLimbo
previously approved these changes
May 5, 2026
rubenporras
requested changes
May 5, 2026
Member
|
Can we try |
Collaborator
Author
|
I also tried this, it doesn't work as you suggest. I'll explain later. |
Member
|
I can believe that, then selecting the plugin versions in the target file? |
joaodinissf
commented
May 5, 2026
| # Tycho-Surefire reports `Tests run: 0` as success — fail the job if no tests ran. | ||
| if: always() | ||
| run: | | ||
| total=$(find . -path '*/target/surefire-reports/TEST-*.xml' -print0 \ |
Collaborator
Author
There was a problem hiding this comment.
Maybe simplify this check.
Tycho-Surefire reports `Tests run: 0` as exit code 0, so a broken test discovery yields a green build with no tests run. PR dsldevkit#1292 went undetected for ~30 days for this reason: orbit-aggregation 4.39.0 introduced JUnit 5.x and 6.x simultaneously, breaking JUnit Platform discovery, and CI happily reported pass. Tycho-Surefire writes no TEST-*.xml when discovery yields zero, so a file-existence check on `**/target/surefire-reports/TEST-*.xml` suffices to catch the silent-zero failure mode. The step runs with `if: always()` so it fires even after build failures. Verified empirically: master (orbit-4.39.0, silent-zero) produces 0 TEST-*.xml; the check correctly fails. Working state (orbit-4.37.0, 357 tests) produces 81 TEST-*.xml; check passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
02fb8b1 to
7241fcf
Compare
rubenporras
approved these changes
May 6, 2026
joaodinissf
added a commit
that referenced
this pull request
May 6, 2026
…IfNecessary call XtextBuildTrigger.scheduleFullBuild() invokes buildScheduler.scheduleBuildIfNecessary(projects) - single arg, no IBuildFlag varargs - but the test verified the call with two matchers: eq(projects) and ArgumentMatchers.<IBuildFlag[]>any(). Mockito 5.x treats the second matcher as expecting a second explicit argument, not "varargs may be empty", so verify reports an argument-count mismatch: Wanted: scheduleBuildIfNecessary([], <any>); Actual: scheduleBuildIfNecessary([]); The test passed under Mockito 4.x where vararg `any()` matched zero or more vararg invocations. This isn't introduced by step 1's 5.21->5.19 patch bump; both are strict. Master has had Mockito 5.x in scope since orbit-aggregation 4.39 (PR #1292), but tests being silent-zero (Tycho-Surefire reporting `Tests run: 0` as success) hid the failure. Step 1 restores test discovery, which surfaces this latent mismatch and makes the test fail deterministically (verified locally: 307 tests, 1 failure on this exact assertion). Drop the second matcher on both verify sites (the never() check and the positive verify); they now match the production single-arg call. The IBuildFlag import is no longer needed. Bundled in PR #1323 so its "restored 307 tests" claim lands green; splitting would ship the orbit-pin PR with a known-failing test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Tests have been silently reporting
Tests run: 0since #1292 (2026-04-01) bumped orbit-aggregation from 2025-09 to 4.39.0. Tycho-Surefire treats zero discovered tests as success, so CI stayed green while coverage dropped to nothing. This PR pins orbit to 4.37.0, restoring 307 tests across 75 classes.Why 4.37.0
orbit-aggregation 4.38.0+ ships every JUnit Jupiter / Platform / Vintage IU at both 5.x and 6.x simultaneously. Tycho's planner installs both families, leaving the OSGi runtime with two
Class<?>instances of JUnit Platform types —LinkageError/ArrayStoreException/ServiceConfigurationErrorat test discovery, silently swallowed asTests run: 0.orbit 4.37.0 (Sept 2025) is the most recent release that ships JUnit at a single family (5.13.4 / Platform 1.13.4) and matches Eclipse 4.34's PDE JUnit runtime bridge. Pinning collapses the three JUnit-Platform-bearing classloaders (Tycho-Surefire's bundled provider, OSGi runtime, Eclipse PDE) onto a single agreed Platform version.
Changes
ddk-target/ddk.target: orbit-aggregation4.39.0→4.37.0; adjust dep versions to 4.37.0-era values (Mockito 5.21→5.19, byte-buddy 1.18.5→1.17.7, etc.); inline 9 JUnit IUs at 5.13.4 / 1.13.4; drop the now-redundantmaven-osgi/release/4.39.0location (a second source of dual-version pollution) and the unused UML2 location atreleases/2022-12(stealth source of additional 5.9.1/1.9.1 IUs).XtextBuildTriggerTest.java: drop the secondIBuildFlagvarargs matcher on twoverify()sites — Mockito 5 enforces strict varargs counting, and the productionscheduleBuildIfNecessary(Iterable<IProject>)is single-arg..github/workflows/verify.yml: fail the job if noTEST-*.xmlfiles were written under any module (Tycho-Surefire writes none when discovery is empty — precise guard against silent-zero).Verification
Local macOS aarch64 (
-Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=aarch64,-XstartOnFirstThread,--add-modules=jdk.incubator.vector): 307 tests across 75 classes, 0 failures, ~1:29 wall clock. Tycho-Surefire's auto-detection selects thejunit5vintageprovider given Jupiter + vintage-engine on the classpath; no<providerHint>override is needed.Step 1 of 4
Step 1 of a staged JUnit cleanup: step 2 (#1324, #1325) migrates remaining JUnit 4 source surface to Jupiter, step 3 (#1326) drops
org.junit 4.13.2and vintage-engine, step 4 (#1327) atomically upgrades to JUnit 6 + Eclipse 4.39.🤖 Generated with Claude Code