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

Timeout for single pytest to 240s #6692

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Jan 9, 2025

In #6674 I set timeout to 60s, but 60s for some tests are too short.
There is an issue open to discuss whether we need to move those to nightly, see #6526 for more discussion.

Really sorry for the #6674, didn't expect 60s still too short.

@unkcpz unkcpz requested a review from agoscinski as a code owner January 9, 2025 17:13
@unkcpz unkcpz requested a review from danielhollas January 9, 2025 17:13
@unkcpz
Copy link
Member Author

unkcpz commented Jan 9, 2025

@danielhollas I increase the overrall timeout to 120s not just for the tests/tools/archive/orm/test_links.py::test_high_level_workflow_links, because @khsrali reported he also saw other two tests can timeout. I hope 120s is fine, or I'll just revert the change?

@danielhollas
Copy link
Collaborator

Since we're currently still seeing issues/failures due to parallel test execution (pytest-xdist), I would slightly prefer to remove the timeout for now so we don't fight two sources of flakiness at once. But I don't feel too strongly, feel free to merge as is.

@khsrali
Copy link
Contributor

khsrali commented Jan 9, 2025

We could also add a timeout only for tests that 'requires_rmq', if that was the reason timeout were added in the first place.

But for now, I agree with @danielhollas that we could just remove it. Since GitHub workers are not reliably running with the same pace always.

@unkcpz
Copy link
Member Author

unkcpz commented Jan 9, 2025

It was trying to solve things like #6659 where the tests timeout after 90m because some hang up. I'd merge as it is, because I think timeout will help PR like #6659.

For the xdist, I think this also helps, no? If something wrong with daemon because of some test racing, it will hang. With timeout, we can quick stop and go to check.

EDIT: @khsrali suggest offline if I want to go with this, run all test suits three times to see nothing failed.

Copy link
Collaborator

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was trying to solve things like #6659 where the tests timeout after 90m because some hang up. I'd merge as it is, because I think timeout will help PR like #6659.

If the main motivation for the timeout is to fail the test suite earlier when a test hangs, then I would suggest to bump the timeout even more, e..g. to 180s or 240s. Since we're running tests in parallel, having the timeout larger should not prolong the overall time as much. Once the tests have been stable for a couple months, and once we perhaps move the slowest tests to nightly, we can revisit the value.

@unkcpz unkcpz changed the title Timeout for single pytest to 120s Timeout for single pytest to 240s Jan 9, 2025
@unkcpz unkcpz merged commit 8ae66fb into aiidateam:main Jan 9, 2025
20 checks passed
@unkcpz unkcpz deleted the timeout-to-120 branch January 9, 2025 18:58
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.94%. Comparing base (1093026) to head (031be8a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6692   +/-   ##
=======================================
  Coverage   77.94%   77.94%           
=======================================
  Files         563      563           
  Lines       41761    41761           
=======================================
  Hits        32545    32545           
  Misses       9216     9216           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

3 participants