Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race in TestCloseConnectionWhenServerPrefaceNotReceived #1897

Merged
merged 1 commit into from
Mar 7, 2018

Conversation

MakMukhi
Copy link
Contributor

@MakMukhi MakMukhi commented Mar 5, 2018

Atomically modify minConnecTimout in testing environment to avoid write-after-read detection.

clientconn.go Outdated
// We use an accessor so that minConnectTimeout can be
// atomically read and updated while testing.
getMinConnectTimeout = func() time.Duration {
return minConnectTimeout
Copy link
Member

Choose a reason for hiding this comment

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

Could you make minConnectTimeout a const, and move the var to be in the test only?

@dfawley dfawley changed the title Fix test race: Atomically access minConnecTimout in testing environment. Fix race in TestCloseConnectionWhenServerPrefaceNotReceived Mar 7, 2018
@MakMukhi MakMukhi merged commit 207e276 into grpc:master Mar 7, 2018
@menghanl menghanl added this to the 1.11 Release milestone Mar 27, 2018
@MakMukhi MakMukhi deleted the fix_1787_2 branch May 4, 2018 02:03
@lyuxuan
Copy link
Contributor

lyuxuan commented Jun 26, 2018

Seeing failure again: https://travis-ci.org/grpc/grpc-go/jobs/396660661

@dfawley
Copy link
Member

dfawley commented Jun 26, 2018

@lyuxuan unfortunately the info in travis is lost when you re-run the job -- better to copy/paste the failure text. Was this the same race detector error?

@lyuxuan
Copy link
Contributor

lyuxuan commented Jun 26, 2018

Ops. (I remember it used to work???) It's not race detector error. I remember it's error caused by empty address list.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants