← Back to Pull requests

test: harden bounded Kafka supervisor timeouts #20124

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

Description

KafkaBoundedSupervisorTest can exceed the embedded cluster's default 60-second latch timeout while a bounded supervisor starts tasks, consumes records, and publishes segments.

The post-merge CI run for PR #20106 provides the evidence:

  • The Unit & Integration tests CI run 32516481844 failed in job 96879148560.

  • The failed JDK 25 shard timed out in KafkaBoundedSupervisorTest.test_boundedSupervisor_doesNotSilentlyCompleteWhenStaleOffsetExceedsNewEnd while waiting for 250 published records.

  • The same shard passed before merge in PR #20106.

  • PR #19543 previously addressed the same cold-start timing issue by using a 120-second wait for one bounded-supervisor ingestion path.
  • This change:

  • Applies a 120-second maximum wait to the bounded-supervisor ingestion waits. The timeout is a ceiling, not a fixed delay.

  • Uses maxRowsPerSegment = 100 for this test class instead of the shared fixture's one-row segments. This reduces segment rollover and publication overhead while preserving the test's offset, row-count, and supervisor-state assertions.
  • There is no user-facing behavior change.

    Release note

    No user-facing behavior change.

    <hr>

    ##### Key changed/added classes in this PR

    * KafkaBoundedSupervisorTest

    <hr>

    This PR has:

  • been self-reviewed.

  • modified an existing test to cover the affected CI timing path.

  • added documentation for new or modified features or behaviors.

  • a release note entry in the PR description (test-only change).

  • added or updated version, license, or notice information in licenses.yaml.
  • Local verification:

    mvn test -pl embedded-tests -am -Dtest=org.apache.druid.testing.embedded.indexing.KafkaBoundedSupervisorTest -Dsurefire.failIfNoSpecifiedTests=false -Pskip-static-checks -Dweb.console.skip=true -T1
    

    Result: 6 tests passed; Maven reactor BUILD SUCCESS.

    Diff: 264 lines (+198 / -66) across 3 files Reviewer: GWphua Review duration: 3143m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 264 lines diff across 3 files
    0.39
    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%
    56%
    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.334
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #20124"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    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: 39.3% (MEDIUM) · Higher = larger blast radius
    39.3%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17% · Safe to merge
    17%
    Repository