-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Flakes: Address TestServerStats flakiness #16991
Conversation
Signed-off-by: Matt Lord <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16991 +/- ##
==========================================
- Coverage 69.35% 67.02% -2.33%
==========================================
Files 1571 1571
Lines 204183 251677 +47494
==========================================
+ Hits 141601 168686 +27085
- Misses 62582 82991 +20409 ☔ View full report in Codecov by Sentry. |
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.
TIL assert.Eventually
exists! I was up until now always writing a for loop with a Ticker 😿!
Description
We have seen the
TestServerStats
unit test fail pretty regularly, in particular in theunit_race
workflow. Example failure:I could not repeat the failure locally (despite trying many different methods), but in walking through the code it was clear that we had a potential race here. The race is this:
mysql
cli invocations to connect and execute queries against this internal serverAccept
handle
function:vitess/go/mysql/server.go
Lines 327 to 359 in dc692fa
handle
function running in the goroutine, most notablyconnCount
which is decremented in a defer:vitess/go/mysql/server.go
Lines 390 to 391 in dc692fa
So in this PR we wait for the expected value to eliminate this race.
Related Issue(s)
Checklist