chore(generator): support parallel system test execution in generated noxfiles#17430
chore(generator): support parallel system test execution in generated noxfiles#17430ohmayr wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces parallel execution for system tests by adding pytest-xdist to the dependencies and configuring pytest to run with -n auto in the noxfile.py.j2 template and its generated golden files. The reviewer recommends making the number of parallel workers configurable via an environment variable (e.g., NOX_SYSTEM_WORKERS) instead of hardcoding auto to prevent potential flakiness, race conditions, or API rate-limiting issues when interacting with live Google Cloud resources.
|
I am going to hold this one off until we can test the changes across all the packages that have system tests. |
|
I wonder if this could cause failures in some packages? Not all tests are written with concurrency in mind. And I could imagine some backends may have limitations too |
Updates the default
noxfile.pytemplate (noxfile.py.j2) in gapic-generator to support parallel test execution for system test suites by default usingpytest-xdist. This allows all generated python client library packages to run their system tests in parallel."pytest-xdist"toSYSTEM_TEST_STANDARD_DEPENDENCIESin gapic/templates/noxfile.py.j2.noxfile.py.j2to run with parallel worker allocation (-n auto).