Skip to content

Fix CI data race in host connect retry tests - #306

Merged
dominicletz merged 1 commit into
masterfrom
cursor/fix-master-ci-retry-race-8869
Jul 16, 2026
Merged

Fix CI data race in host connect retry tests#306
dominicletz merged 1 commit into
masterfrom
cursor/fix-master-ci-retry-race-8869

Conversation

@dominicletz

Copy link
Copy Markdown
Member

Summary

Master CI failed on commit 033d081 ("Implement backoff for dead servers") because go test -race detected a data race in the new retry tests.

Failed run: Ubuntu job failed during make openssl / make test; other platform jobs were cancelled as a result.

Root cause

TestHostConnectRetryBackoff and TestDoSelectNextHostSkipsBackoff both call t.Parallel() while writing config.AppConfig. NewClientManagerNewPool reads that global, so the two tests race under -race.

Fix

Remove t.Parallel() from both tests, matching client_manager_getdefault_test.go and AGENTS.md guidance to use t.Parallel() only when truly safe.

Verification

go test -race -count=5 -run 'TestHostConnectRetryBackoff|TestDoSelectNextHostSkipsBackoff' ./rpc/

Passes locally after this change.

Open in Web Open in Cursor 

Remove t.Parallel from tests that mutate global config.AppConfig.
CI runs go test -race, and the parallel AppConfig writes raced with
NewPool/NewClientManager reads in the sibling test.

Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request removes t.Parallel() from TestHostConnectRetryBackoff and TestDoSelectNextHostSkipsBackoff in rpc/client_manager_retry_test.go because these tests mutate the global config.AppConfig configuration, which could lead to race conditions if run in parallel. Explanatory comments have been added to document this behavior. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@dominicletz
dominicletz marked this pull request as ready for review July 16, 2026 16:03
@dominicletz
dominicletz merged commit d8c9d09 into master Jul 16, 2026
18 checks passed
@dominicletz
dominicletz deleted the cursor/fix-master-ci-retry-race-8869 branch July 16, 2026 16:03
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