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

Reduce timeout in order to speed up tests #7678

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

berland
Copy link
Contributor

@berland berland commented Apr 16, 2024

For the test id's that are expected to timeout (5 of them), the test runtime will indeed be the timeout. 0.2 has been proven to be too small (the initial commit) for MacOS runners. 5 seconds is proven to be sufficient, but is probably overkill. Try 1 second as a middle ground.

Issue
Resolves 25 seconds to run one test function (reduced to 5 seconds).

Approach
Shorten timeout

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure tests pass locally (after every commit!)

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

For the test id's that are expected to timeout (5 of them), the
test runtime will indeed be the timeout. 0.2 has been proven to
be too small (the initial commit) for MacOS runners. 5 seconds
is proven to be sufficient, but is probably overkill. Try 1 second
as a middle ground.
@berland berland added the release-notes:skip If there should be no mention of this in release notes label Apr 16, 2024
@berland berland self-assigned this Apr 16, 2024
@jonathan-eq jonathan-eq self-requested a review April 16, 2024 07:39
Copy link
Contributor

@jonathan-eq jonathan-eq left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -453,7 +453,7 @@ async def test_faulty_bjobs(monkeypatch, tmp_path, bjobs_script, expectation):
driver = LsfDriver()
with expectation:
await driver.submit(0, "sleep")
await asyncio.wait_for(poll(driver, {0}), timeout=5)
await asyncio.wait_for(poll(driver, {0}), timeout=1)
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be great!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.76%. Comparing base (decf4ba) to head (b0ebe91).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7678      +/-   ##
==========================================
- Coverage   84.84%   84.76%   -0.08%     
==========================================
  Files         383      383              
  Lines       23301    23301              
  Branches      880      877       -3     
==========================================
- Hits        19770    19752      -18     
- Misses       3417     3436      +19     
+ Partials      114      113       -1     

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

@berland berland merged commit 57b4398 into equinor:main Apr 16, 2024
37 checks passed
@berland berland deleted the speedup_faulty_bjobs branch May 29, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:skip If there should be no mention of this in release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants