⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Port of #37101
Fix the flaky test by properly creating a race condition between HandleTransactionCompleted and ClearTransactions.

Original prompt

Port #37101 to release/10.0


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: AndriySvyryd <[email protected]>
Copilot AI changed the title [WIP] Port changes from PR #37101 to release 10.0 Port fix for flaky transaction race test Jan 15, 2026
Copilot AI requested a review from AndriySvyryd January 15, 2026 20:18
@AndriySvyryd AndriySvyryd changed the title Port fix for flaky transaction race test [release/10.0] Port fix for flaky transaction race test Jan 15, 2026
@AndriySvyryd AndriySvyryd requested a review from a team January 15, 2026 22:36
@AndriySvyryd AndriySvyryd marked this pull request as ready for review January 15, 2026 22:36
Copilot AI review requested due to automatic review settings January 15, 2026 22:36
@AndriySvyryd AndriySvyryd changed the title [release/10.0] Port fix for flaky transaction race test [release/10.0] Fix HandleTransactionCompleted test flakiness Jan 15, 2026
Copy link

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 ports a fix for a flaky concurrency test that verifies thread safety between HandleTransactionCompleted and ClearTransactions in the RelationalConnection class. The original test had unreliable race condition triggering because it randomly chose operation order. The new implementation explicitly tests both orderings of operations to ensure the race condition is properly exercised.

Changes:

  • Converted test from synchronous to async
  • Split test into two explicit scenarios instead of random ordering
  • First scenario: calls scope.Complete() before ResetState()
  • Second scenario: calls ResetState() with a delay before scope.Complete()

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.

2 participants