Hi, I have added a timeout to the python tests and...
# general
a
Hi, I have added a timeout to the python tests and when a test fails, it doesn’t print any logs of the test. For example, when during a test an exception is raised, then I see logs of the test. Do I miss any additional configuration related to the timeout or is it not handled? Thank you!
Exceeded timeout of 600.0 seconds when executing local process: Run Pytest for …
1
Copy code
./pants test --test-timeout-default=20  --test-output=all ::

12:53:30.71 [WARN] Failed to generate coverage data for python/projects/…/test.py:../integration-tests.

12:53:30.73 [WARN] Failed to generate JUnit XML data for python/projects/…/test.py:../integration-tests.

12:53:30.73 [ERROR] Completed: Run Pytest - python/projects/…/test.py:../integration-tests failed (exit code -15).
Exceeded timeout of 20.0 seconds when executing local process: Run Pytest for python/projects/…/test.py:../integration-tests:../integration-tests

✕ python/projects/…/test.py:integration-tests failed in 20.04s.
So, either using
--test-output=all
I cannot see logs 😞
pants version:
2.14.0a0
If I run the same command without test timeout,
Copy code
./pants test --test-output=all ::
then I’ll see output of all tests. So, test timeout somehow remove the logs?
b
IIRC Today, if a process is killed we don't capture the output. You might look an existing GitHub issue feature request or make your own
h
Hi, this was actually just improved this week! https://github.com/pantsbuild/pants/pull/16841 It looks like we need to cherry-pick it to 2.14 still. I will get that out today, and possibly another 2.14 rc
🎉 2
b
Woah cool!!