Skip to content

Use version pattern in noDependencyManagementSection test#7475

Merged
knutwannheden merged 1 commit intomainfrom
fix-junit-version-flake
Apr 27, 2026
Merged

Use version pattern in noDependencyManagementSection test#7475
knutwannheden merged 1 commit intomainfrom
fix-junit-version-flake

Conversation

@knutwannheden
Copy link
Copy Markdown
Contributor

@knutwannheden knutwannheden commented Apr 27, 2026

Motivation

  • ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSection resolves the latest 5.x of org.junit.jupiter:junit-jupiter from Maven Central at runtime, but asserts against a hardcoded post-recipe version (5.14.3). Every new junit-jupiter patch release breaks CI for every PR opened thereafter until someone bumps the literal. The most recent break is 5.14.4, published earlier today — verified locally on origin/main HEAD with the same 5.14.3 → 5.14.4 diff seen in the CI failure on Align ASM and Kotlin stdlib versions across modules #7474.

Summary

Test plan

  • ./gradlew :rewrite-maven:test --tests "org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSection"BUILD SUCCESSFUL against today's junit-jupiter:5.14.4.

ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSection
hardcoded the post-recipe junit-jupiter version as 5.14.3, but the
recipe resolves "5.x" against Maven Central at runtime. Every new
junit-jupiter 5.x patch release breaks CI for every PR until someone
bumps the literal. The most recent break is 5.14.4, published earlier
today.

Switch the assertion to a regex pattern matching any 5.x.x release,
following the convention established in #6799 / #6856.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 27, 2026
@knutwannheden knutwannheden changed the title Use version pattern in noDependencyManagementSection test Use version pattern in noDependencyManagementSection test Apr 27, 2026
@knutwannheden knutwannheden merged commit 4687514 into main Apr 27, 2026
1 check passed
@knutwannheden knutwannheden deleted the fix-junit-version-flake branch April 27, 2026 08:35
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant