Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pytest timeout configurable and with higher defaults #912

Closed

Conversation

pedro-psb
Copy link
Member

@pedro-psb pedro-psb commented Sep 11, 2024

As stated here, the timeout is meant to catch unexpected hanging tasks and have to meaningful stacktrace.

Then, it is not so important to minimize the timeout as it is to prevent long testing from failing unexpectedly, so I think we can raise the bar here.

01h sounds safe in general?

Context

This rpm test was failing due to the timeout and took me some time to realize this was this pytest-timeout plugin. On my machine it ran in 38m.

This is to catch unexpected hanging tasks and have meaningful traceback,
so it is not so important to try to minimize the timeout as it is to
not have long test failing because they are on the edge.

01h sounds safe?
@mdellweg
Copy link
Member

You can use @pytest.mark.timeout(3600) on a specific test. I would prefer that.
Remember the timeout is per test, not for the whole testsuite. So just five tests hanging for 1h would hit the GH timelimit of 5h again.

@pedro-psb
Copy link
Member Author

Sounds fair. I did consider overriding the specific test, but was not sure it was the best option.
The GH limit is a good factor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants