← Back to Pull requests

test: finish remaining JUnit 5 migration cleanup #20125

Closed
unknown closed this pull request without merging on Aug 24, 2026 08:54 UTC
View on GitHub
unknown unknown commented on Aug 22, 2026 14:08 UTC
Author

Part of #13948.

Summary

Complete the remaining JUnit 5 migration cleanup across the repository.

  • Migrate the remaining JUnit 4 test classes and helpers to JUnit 5.

  • Remove obsolete JUnit 4, Vintage, JUnitParams, migration-support, system-rules, and JUnit benchmark dependencies.

  • Remove obsolete JUnit migration recipes, OpenRewrite testing-framework support, and dev/validate-junit5-usage.

  • Extend TemporaryFolderExtension with classScoped() and testCaseScoped() lifecycles and migrate eligible temporary-directory usage.

  • Move CostBalancerStrategyBenchmark into the benchmarks module and preserve its benchmark behavior using JMH.

  • Remove obsolete test rules and simplify migrated test helpers.

  • Retain Hamcrest and opentest4j only where active tests still require them.
  • JDK 25 Schemaless test stability

    Migrate SchemalessTestSimpleTest from JUnit 4 class-level parameterization to JUnit 5 method-level parameterization.

    The fixture lifecycle and cleanup changes incorporate the approach from PR #20121:

  • Create independent fixtures for each parameterized test invocation.

  • Close each segment with try-with-resources.

  • Close intermediate mapped indexes after creating the merged index.

  • Keep the existing @Disabled annotation only for the pre-existing TopN null-handling issue.
  • These changes prevent the intermittent JDK 25 direct-buffer crash observed during the original migration attempt.

    Validation

  • Affected processing, indexing-service, server, and embedded-tests modules compile successfully.

  • Focused migrated tests pass on JDK 25.

  • Checkstyle and SpotBugs pass with no violations or reported bugs.

  • The Kafka simulation tests pass with the required Hamcrest test dependency.

  • git diff --check passes.
  • This PR contains test and build/test-tooling changes only; there are no user-facing behavior changes.

    Diff: 245 lines (+183 / -62) across 3 files Reviewer: GWphua Review duration: 2566m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.62) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.62 · 245 lines diff across 3 files
    0.62
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    57%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.062
    Real PR Conversation Timeline
    1 comments
    "Review active on #20125"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 62% (MEDIUM) · Higher = larger blast radius
    62%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 58.0% · Lower = rushed or shallow review
    58.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.1% · Safe to merge
    26.1%
    Repository