Skip to content

Fix flaky ExactlyOnce and PartialUpsertRebalance integration tests#17834

Closed
xiangfu0 wants to merge 2 commits intoapache:masterfrom
xiangfu0:flaky-kafka-exactlyOnce-test
Closed

Fix flaky ExactlyOnce and PartialUpsertRebalance integration tests#17834
xiangfu0 wants to merge 2 commits intoapache:masterfrom
xiangfu0:flaky-kafka-exactlyOnce-test

Conversation

@xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Mar 6, 2026

Summary

  • ExactlyOnceKafkaRealtimeClusterIntegrationTest: Use a single KafkaProducer for both abort and commit transactions to ensure proper state machine sequencing of transaction markers. Added verification that committed records are visible to read_committed consumers before proceeding.
  • PartialUpsertTableRebalanceIntegrationTest: Replace the fragile pause/drop-segments/restart-Kafka cleanup with a cleaner drop/recreate table lifecycle. Re-init SegmentBuildTimeLeaseExtender executor after stopping servers. Add dropRealtimeTable in tearDown.

Test plan

  • ExactlyOnceKafkaRealtimeClusterIntegrationTest passes locally (9 run, 0 failures)
  • PartialUpsertTableRebalanceIntegrationTest passes locally (3 run, 0 failures)

🤖 Generated with Claude Code

- ExactlyOnce: Use single KafkaProducer for abort+commit transactions
  to ensure proper state machine sequencing of transaction markers,
  and verify committed records are visible before proceeding.
- PartialUpsertRebalance: Replace pause/drop-segments/restart cleanup
  with drop/recreate table lifecycle; re-init SegmentBuildTimeLeaseExtender
  executor after stopping servers; add dropRealtimeTable in tearDown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.26%. Comparing base (6cb9a73) to head (11c1bda).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17834      +/-   ##
============================================
- Coverage     63.34%   63.26%   -0.08%     
- Complexity     1456     1466      +10     
============================================
  Files          3189     3190       +1     
  Lines        191782   191904     +122     
  Branches      29358    29390      +32     
============================================
- Hits         121480   121404      -76     
- Misses        60801    61001     +200     
+ Partials       9501     9499       -2     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.24% <ø> (-0.05%) ⬇️
java-21 63.23% <ø> (-0.02%) ⬇️
temurin 63.26% <ø> (-0.08%) ⬇️
unittests 63.25% <ø> (-0.08%) ⬇️
unittests1 55.58% <ø> (-0.01%) ⬇️
unittests2 34.25% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@xiangfu0 xiangfu0 closed this Mar 8, 2026
@xiangfu0 xiangfu0 deleted the flaky-kafka-exactlyOnce-test branch March 8, 2026 07:22
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