-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
migrate test-infra to testify for util/stmtsummary
pkg
#26420
Comments
/assign |
i am alomst finish, see https://github.com/feitian124/tidb/tree/issue-26420 ❯ go test ./... --count=1
--- FAIL: TestPrevSQL (0.00s)
statement_summary_test.go:1308:
Error Trace: statement_summary_test.go:1308
Error: Not equal:
expected: 2
actual : 1
Test: TestPrevSQL
--- FAIL: TestAccessPrivilege (0.00s)
statement_summary_test.go:1403:
Error Trace: statement_summary_test.go:1403
Error: Not equal:
expected: 32
actual : 2
Test: TestAccessPrivilege
FAIL
FAIL github.com/pingcap/tidb/util/stmtsummary 0.032s
FAIL the orignal test implemented in
while migrated to testify, i did not use suite, so it very likely the failed 2 is caused by shared states and order. i need some dig, maybe for simple, change to use suite too. could you please give some advise? thanks . @tisonkun |
You don't have to rely on global variable and just create ssmap for each test. Also in this way you can run test in parallel. We don't keep bad smell legacy code and do mechanically migration. You can take a look at patch.diff.txt. |
part 0 won't close this issue, will update PR description |
No description provided.
The text was updated successfully, but these errors were encountered: