pmm
pmm copied to clipboard
Improve tests execution time by running them in-parallel
Description
managed
tests execution takes around 20m in GitHub and should be improved by optimizing tests and/or running them in parallel.
Suggested solution
Apply t.Parallel()
where it's possible
Additional context
Target package: https://github.com/percona/pmm/tree/main/managed How to run tests in parralell: https://eleni.blog/2019/05/11/parallel-test-execution-in-go/
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Can you point me to the location of the tests? Thx! 😄
@erinlkolp Hello, this ticket mainly about managed
component tests: https://github.com/percona/pmm/tree/main/managed
So almost every package there has _test.go
files. Some tests rely on database state, so not every test can be parallelized. However a lot of them can.
Managed tests works only inside devcontainer, so your actions will be like:
- clone pmm repo
git clone [email protected]:percona/pmm.git
- run
make env-up
in the project root folder - run
make env
to step in devcontainer - run
cd managed
to change root to the managed folder - modify tests
- run
make test
to run managed tests - check that all tests are passing
@artemgavrilov Thank you so much! My son and I will be taking a crack at this!