-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
test: fix flaky TestAlterAddConstraintStateChange3 #48131
Conversation
Hi @jiyfhust. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48131 +/- ##
================================================
+ Coverage 71.6145% 72.7816% +1.1670%
================================================
Files 1401 1423 +22
Lines 405923 412284 +6361
================================================
+ Hits 290700 300067 +9367
+ Misses 95448 93305 -2143
+ Partials 19775 18912 -863
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CbcWestwolf, fzzf678, hawkingrei The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test mysql-test |
@jiyfhust: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test mysql-test |
@jiyfhust: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/retest |
What problem does this PR solve?
Issue Number: close #48123
Problem Summary:
There seems a race between:
https://github.com/pingcap/tidb/blob/3894bc5232183d8107482cae4f6c121a71478cb8/pkg/ddl/constraint_test.go#L239C43-L239C43
and
https://github.com/pingcap/tidb/blob/3894bc5232183d8107482cae4f6c121a71478cb8/pkg/ddl/constraint_test.go#L247C1-L247C1
The reason is:
How to reproduce:
before Hook L239, we add a line "time.Sleep(50 * time.Millisecond)" to make the race more competitive, then run the tests.
What is changed and how it works?
Sleep 50ms after add constraints to wait Hook finish. 50ms is enough generally for the simple sql "insert into t values(1)".
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.