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

migrate test-infra to testify for session/pessimistic_test.go #28325

Closed
Tracked by #26864
tisonkun opened this issue Sep 25, 2021 · 6 comments · Fixed by #34353
Closed
Tracked by #26864

migrate test-infra to testify for session/pessimistic_test.go #28325

tisonkun opened this issue Sep 25, 2021 · 6 comments · Fixed by #34353
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.

Comments

@tisonkun
Copy link
Contributor

No description provided.

@tisonkun tisonkun added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Sep 25, 2021
@hawkingrei
Copy link
Member

/assign

@tisonkun
Copy link
Contributor Author

tisonkun commented Mar 11, 2022

cc @hawkingrei @bb7133 @tiancaiamao

So far, check_dev_2 use -check.f and -check.exclude to switch between pessimistic tests and other session tests.

However, as we're migrating from go-check (pingcap/check) to testify, these flags doesn't work anymore and we'd better using a new approach to achieve the goal.

I propose that we:

  1. Introduce a new flag named runPessimisticTest in the codebase.
  2. Pass the flag accordingly in the test script linked above.
  3. Switch behavior in the codebase.
  4. Stop passing -check.f and -check.exclude flags.

In this way, we're decouple with go-check's test filter mechanism.

@tisonkun
Copy link
Contributor Author

Another proposal is that we move these real tikv dependent tests to a new directory so that we don't mix up unit tests and those, as well as avoiding pushing all real tikv dependent tests under "session" pkg.

@tisonkun
Copy link
Contributor Author

Instead of modifying the CI pipeline, we can also handle those flag in code and thus decouple from CI changes.

@tisonkun
Copy link
Contributor Author

FYI you can refer to this file changes for my idea. But session test is still too stateful to debug...I'm unsure whether I make the test cases migrated right.

https://github.com/pingcap/tidb/pull/34072/files#diff-e951bea80fdefa1841c9403b93301ac5a9d68fc7e623538d2ccfddd159056191

@tisonkun
Copy link
Contributor Author

I'm trying to running these tests with GitHub Actions so that I can handle the environment better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
2 participants