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

[vtctldserver] Update tests to prevent races during tmclient init #8320

Merged
merged 1 commit into from
Jun 12, 2021

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Jun 12, 2021

Signed-off-by: Andrew Mason amason@slack-corp.com

Description

Prior to this change, running the full grpcvtctldserver test suite a few times would occasionally produce a panic, ultimately owing to: fatal error: concurrent map read and map write. The stack, which I didn't copy, and the RNG deities are not cooperating right now, points back to tmclient.NewTabletManagerClient coming from various tests here.

So, I went through the tests and found any test that was using t.Parallel() (good!) but not using the testutil.NewVtctldServerWithTabletManagerClient() (less good!).

Related Issue(s)

Checklist

  • Tests were added or are not required -- n/a
  • Documentation was added or is not required -- n/a

Deployment Notes

Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 merged commit 4640645 into vitessio:main Jun 12, 2021
Vtctld Service automation moved this from In progress to Done Jun 12, 2021
@ajm188 ajm188 deleted the am_fix_vtctld_test_races branch June 12, 2021 18:53
ajm188 added a commit to tinyspeck/vitess that referenced this pull request Jul 23, 2021
[vtctldserver] Update tests to prevent races during tmclient init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants