I have `[test].attempts_default = 3` in CI. Is the...
# general
p
I have
[test].attempts_default = 3
in CI. Is there a way to get the output of all test attempts instead of just the last attempt? Background: Some of the code under test (they are integration tests) use an external service: RabbitMQ. I modified the code so that all of the exchange/queue names include the slot number (
[pytest].execution_slot_var
) which mitigates much of the cross test pollution. But I just had CI fail, and the test output shows that the each attempt is leaving data behind that is breaking the subsequent attempts. So, I don't know what the initial error was that caused the test to fail. As soon as I dropped
[test].attempts_default
to
1
, the test--of course--passed, even though it consistently failed for a bunch of previous CI runs. Oh, and how marvelous. CI just passed after reverting the commit that lowered attempts_default. I love reproducibility heisenbugs 🤦
b
Unfortunately looks like no, not yet: I think this is the relevant code and it only extracts the output from the last attempt: https://github.com/pantsbuild/pants/blob/e14d5bc310bca79c27a0cfbbfa7e84e1c97b8ced/src/python/pants/core/goals/test.py#L181-L186
p
Maybe that needs to be updated to show first and last attempts, unless the output is the same in which case just show the last. Thanks for the link. I might file an issue at some point.