fix(test): retry Kafka partition readiness #19948
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.346
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #19948"
general
weight: 0.35
abhishekrb19
Description
This is a follow-up to #19922 that hardens the embedded Kafka test resource against the topic metadata propagation race observed during that PR's CI run.
KafkaResource.createTopicWithPartitions()waits for the topic-creation future, but Kafka can acknowledge creation before the topic metadata and partition leaders are ready for a subsequentlistOffsetsrequest. The existingwaitForPartitionsToBeReady()performed that request only once, so the test setup could fail withUnknownTopicOrPartitionExceptionduring the propagation window.This PR:
RetriableExceptioninstances, including exceptions nested inExecutionException;There is no end-user behavior change; this only stabilizes embedded test setup.
Evidence
KafkaIndexFaultToleranceTest.KafkaFutureImpl.get->KafkaResource.waitForPartitionsToBeReady->KafkaResource.createTopicWithPartitions, withUnknownTopicOrPartitionExceptionas the cause.93262496826), while nearby runs passed, confirming a timing-dependent failure.KafkaResourceTestpassed (1 test), and the focused fault-tolerance test passed twice, including both parameterizations: 9 tests, 0 failures, 0 errors on each run.Validation
All commands passed locally.