-
Notifications
You must be signed in to change notification settings - Fork 465
[coordinator] Use runServer in all tests in query_test.go #3767
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
Conversation
go func() { | ||
asyncDownsampler.Lock() | ||
defer asyncDownsampler.Unlock() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this change TestGRPCBackend
fails with nil pointer panic.
Codecov Report
@@ Coverage Diff @@
## master #3767 +/- ##
======================================
Coverage 56.9% 56.9%
======================================
Files 552 552
Lines 63007 63007
======================================
Hits 35896 35896
Misses 23925 23925
Partials 3186 3186
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
What this PR does / why we need it:
Small refactor to query_test.go to use runServer helper to remove some duplicated test code. I have started using MemStore instead of mocked one. It seems it might have revealed race condition in asyncDownsampler constructor that I fixed by moving lock.
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: