You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing tests in CI, sometimes a test may hang indefinitely. One can look at the output using -v but that might not always be reliable.
If each worker would set a specific environment variable with the test it is executing, one can use a process monitoring library like psutil to figure out which worker is running which test. This could be a variable named something like PYTEST_XDIST_CURRENT_TEST which is set to the test node id. Alternatively, we could also add if the test is in the setup, call or teardown phase.
The implementation should be trivial and can be really helpful when diagnosing CI problems.
When executing tests in CI, sometimes a test may hang indefinitely. One can look at the output using
-v
but that might not always be reliable.If each worker would set a specific environment variable with the test it is executing, one can use a process monitoring library like
psutil
to figure out which worker is running which test. This could be a variable named something likePYTEST_XDIST_CURRENT_TEST
which is set to the test node id. Alternatively, we could also add if the test is in thesetup
,call
orteardown
phase.The implementation should be trivial and can be really helpful when diagnosing CI problems.
@RonnyPfannschmidt what do you think?
The text was updated successfully, but these errors were encountered: