Skip to content

[chore][test] Fix flaky postgres pipeline test case#4293

Merged
lvyanquan merged 2 commits intoapache:masterfrom
Hisoka-X:fix-flaky-test-case
Mar 4, 2026
Merged

[chore][test] Fix flaky postgres pipeline test case#4293
lvyanquan merged 2 commits intoapache:masterfrom
Hisoka-X:fix-flaky-test-case

Conversation

@Hisoka-X
Copy link
Member

Fix flaky test case testDatabaseNameWithHyphenEndToEnd. Please refer https://github.com/apache/flink-cdc/actions/runs/22517874846/job/65238342570

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses flakiness in the Postgres pipeline IT case testDatabaseNameWithHyphenEndToEnd by switching away from executeAndCollect() toward an async job execution + explicit collection and cancellation flow, aiming to ensure the replication slot is released before cleanup.

Changes:

  • Replaced executeAndCollect() with a CollectResultIterator-based collector setup for deterministic event collection.
  • Executes the streaming job asynchronously and explicitly cancels it during cleanup to release the replication slot.
  • Adjusted cleanup ordering to drop the replication slot and database after job cancellation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@lvyanquan lvyanquan left a comment

Choose a reason for hiding this comment

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

+1.

@lvyanquan lvyanquan merged commit 31d68ac into apache:master Mar 4, 2026
37 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants