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

fix flaky test and unit_race failure #5187

Merged
merged 2 commits into from
Sep 13, 2019

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Sep 13, 2019

TestBuildPlayerPlanNoDup is failing intermittently because the order of tables in the error message varies.
This PR changes the asserting to check for a substring instead of an exact match.

Before:

~/go/src/vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication$ for i in {1..10}
> do
> go test -run NoDup
> done
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	7.037s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.836s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	6.762s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.972s
--- FAIL: TestBuildPlayerPlanNoDup (0.00s)
    replicator_plan_test.go:674: 
        	Error Trace:	replicator_plan_test.go:674
        	Error:      	Error message not equal:
        	            	expected: "more than one target for source table t: t1 and t2"
        	            	actual  : "more than one target for source table t: t2 and t1"
        	Test:       	TestBuildPlayerPlanNoDup
FAIL
exit status 1
FAIL	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.852s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.848s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.790s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	6.777s
--- FAIL: TestBuildPlayerPlanNoDup (0.00s)
    replicator_plan_test.go:674: 
        	Error Trace:	replicator_plan_test.go:674
        	Error:      	Error message not equal:
        	            	expected: "more than one target for source table t: t1 and t2"
        	            	actual  : "more than one target for source table t: t2 and t1"
        	Test:       	TestBuildPlayerPlanNoDup
FAIL
exit status 1
FAIL	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.870s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.699s

After:

~/go/src/vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication$ for i in {1..10}; do go test -run NoDup; done
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	6.055s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	4.838s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.715s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.822s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	6.896s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.966s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	5.974s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	7.005s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	6.004s
PASS
ok  	vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication	6.717s

Signed-off-by: deepthi deepthi@planetscale.com

Copy link
Contributor

@sougou sougou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh. I had fixed this in my branch. I'll undo it on my side.

@deepthi deepthi changed the title fix flaky test fix flaky test and unit_race failure Sep 13, 2019
@deepthi
Copy link
Member Author

deepthi commented Sep 13, 2019

Also fix unit_race failure in CI.

Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi
Copy link
Member Author

deepthi commented Sep 13, 2019

rebased to get #5185

@deepthi deepthi merged commit 2bf60f2 into vitessio:master Sep 13, 2019
@enisoc enisoc deleted the ds-fix-flaky-test branch September 13, 2019 17:28
systay pushed a commit that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants