Skip to content

SONARJAVA-6625 Migrate remaining tests to JUnit 5#5796

Merged
vdiez merged 2 commits into
masterfrom
codex/fix-next-quality-gate
Jul 16, 2026
Merged

SONARJAVA-6625 Migrate remaining tests to JUnit 5#5796
vdiez merged 2 commits into
masterfrom
codex/fix-next-quality-gate

Conversation

@vdiez

@vdiez vdiez commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the deprecated JUnit rule migration bridge with native JUnit 5 extensions and @TempDir
  • migrate the shared external-report and input-file test helpers
  • remove junit-jupiter-migrationsupport from all five affected modules
  • keep the Java sensor telemetry assertion aligned with the migrated source it analyzes

Why

The Next quality gate reports 12 open java:S5738 issues, all caused by @EnableRuleMigrationSupport, which is deprecated and marked for removal.

Verification

  • Java 26: targeted Maven reactor build across 15 modules (BUILD SUCCESS)
  • 115 selected test executions: 114 passed, 1 skipped
  • confirmed no EnableRuleMigrationSupport or junit-jupiter-migrationsupport references remain

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Migrate remaining tests to JUnit 5 SONARJAVA-6625 Migrate remaining tests to JUnit 5 Jul 15, 2026
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

SONARJAVA-6625

@mallory-scotton mallory-scotton self-requested a review July 16, 2026 06:20

@mallory-scotton mallory-scotton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just left one small nitpick.

Comment thread java-frontend/src/test/java/org/sonar/java/InputFileUtils.java
Comment thread java-frontend/src/test/java/org/sonar/java/InputFileUtils.java Outdated
Comment thread java-frontend/src/test/java/org/sonar/java/InputFileUtils.java Outdated
@sonarqube-next

Copy link
Copy Markdown

@vdiez vdiez merged commit 918b7b7 into master Jul 16, 2026
15 checks passed
@vdiez vdiez deleted the codex/fix-next-quality-gate branch July 16, 2026 07:48
@gitar-bot

gitar-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Migrates legacy JUnit 4 rules to native JUnit 5 extensions and @TempDir, resolving all S5738 deprecation issues. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants