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

tabletserver: fix flaky test #7851

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

vmg
Copy link
Collaborator

@vmg vmg commented Apr 13, 2021

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

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Copy link
Member

@harshit-gangal harshit-gangal left a 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 {
Copy link
Contributor

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 >=?

Copy link
Collaborator Author

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.

@harshit-gangal
Copy link
Member

@vmg rebase from master will fix CI failure.

vmg added 2 commits April 15, 2021 10:49
Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Failing TestConsolidatorMemoryLimits Flaky TestConsolidatorMemoryLimits
5 participants