-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tabletserver: fix flaky test #7851
Conversation
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.
I tried this locally and it is not failing for the first part of the test.
It is failing below now.
--- FAIL: TestConsolidatorMemoryLimits (0.54s)
--- FAIL: TestConsolidatorMemoryLimits/multiple_phase_consolidation (0.17s)
stream_consolidator_test.go:398:
Error Trace: stream_consolidator_test.go:398
Error: Not equal:
expected: 4
actual : 3
Test: TestConsolidatorMemoryLimits/multiple_phase_consolidation
@@ -97,6 +99,15 @@ func (ct *consolidationTest) leader(stream StreamCallback) error { | |||
return nil | |||
} | |||
|
|||
func (ct *consolidationTest) waitForResults(worker int, count int64) { | |||
for { | |||
if atomic.LoadInt64(&ct.results[worker].count) > count { |
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.
Just making sure you intended for >
and not >=
?
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.
Ayup, it needs to wait until we have received more than the expected amount of results.
@vmg rebase from master will fix CI failure. |
Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Vicent Marti <vmg@strn.cat>
1bdd2b4
to
37a2a5c
Compare
Description
This is a flaky test that @harshit-gangal detected. I'm quite sure this is the proper fix.
Related Issue(s)
Fixes #7832
Fixes #7837
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: