Skip to content

fix(test): fix rpcErrorProxy race causing flaky ConnectionDrop recovery test#3117

Merged
calbera merged 1 commit into
mainfrom
fix-rpc-proxy-deactivate-race
May 28, 2026
Merged

fix(test): fix rpcErrorProxy race causing flaky ConnectionDrop recovery test#3117
calbera merged 1 commit into
mainfrom
fix-rpc-proxy-deactivate-race

Conversation

@fridrik01
Copy link
Copy Markdown
Contributor

This PR fixes a flaky TestFinalizeBlock_ConnectionDrop_Recovery test by snapshotting active/dropConn once in intercept() instead of reading them separately.

deactivate() clears the two flags in separate stores, so a request could race in and serve a spurious empty JSON-RPC error instead of dropping the connection. The CL treats that error as non-retryable, so FinalizeBlock fails instead of recovering.

@fridrik01 fridrik01 requested review from bar-bera and calbera May 28, 2026 18:19
@fridrik01 fridrik01 self-assigned this May 28, 2026
@fridrik01 fridrik01 requested a review from a team as a code owner May 28, 2026 18:19
Copilot AI review requested due to automatic review settings May 28, 2026 18:19
Copy link
Copy Markdown
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

Fixes a race in the test proxy's intercept() where active and dropConn atomics were loaded separately, allowing a concurrent deactivate() to clear them between loads and cause a spurious empty JSON-RPC error response instead of a connection drop — making TestFinalizeBlock_ConnectionDrop_Recovery flaky.

Changes:

  • Snapshot active and dropConn once at entry to intercept().
  • Use the snapshotted dropConn value for the subsequent branch decision.

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

Copy link
Copy Markdown
Contributor

@calbera calbera left a comment

Choose a reason for hiding this comment

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

utack

@calbera calbera merged commit a5b24d5 into main May 28, 2026
23 checks passed
@calbera calbera deleted the fix-rpc-proxy-deactivate-race branch May 28, 2026 19:18
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.

3 participants