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

🐛 fixing flaky test test_checked_once_task_is_auto_removed #4527

Merged
merged 6 commits into from
Jul 21, 2023

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Jul 21, 2023

What do these changes do?

Very pesky edge case
FAILED tests/long_running_tasks/test_long_running_tasks_task.py::test_checked_once_task_is_auto_removed - Failed: DID NOT RAISE <class 'servicelib.long_running_tasks._errors.TaskNotFoundError'>

Pytest raises a BaseException that is not caught and retried by tenacity.
Also the test logic was not 100% accurate

Related issue/s

How to test

DevOps Checklist

@GitHK GitHK marked this pull request as ready for review July 21, 2023 14:09
@GitHK GitHK requested a review from pcrespov as a code owner July 21, 2023 14:09
@GitHK GitHK self-assigned this Jul 21, 2023
@GitHK GitHK added the t:maintenance Some planned maintenance work label Jul 21, 2023
@GitHK GitHK added this to the Sundae milestone Jul 21, 2023
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #4527 (c592fea) into master (d361314) will decrease coverage by 2.2%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4527     +/-   ##
========================================
- Coverage    86.5%   84.4%   -2.2%     
========================================
  Files        1008     824    -184     
  Lines       43128   36582   -6546     
  Branches      998     530    -468     
========================================
- Hits        37337   30892   -6445     
- Misses       5561    5562      +1     
+ Partials      230     128    -102     
Flag Coverage Δ
integrationtests 68.3% <ø> (+<0.1%) ⬆️
unittests 83.5% <ø> (-0.6%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...library/src/servicelib/long_running_tasks/_task.py 95.2% <ø> (ø)

... and 251 files with indirect coverage changes

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Paired reviewed. Please re-assign when our discussion was revisited. Thank you.

@GitHK GitHK requested review from pcrespov and sanderegg July 21, 2023 15:06
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

thanks for fixing this!

@GitHK GitHK enabled auto-merge (squash) July 21, 2023 15:11
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Your last modifications seem more clear to me. thx!
Some extra minor comments

@codeclimate
Copy link

codeclimate bot commented Jul 21, 2023

Code Climate has analyzed commit c592fea and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@GitHK GitHK merged commit 9988654 into ITISFoundation:master Jul 21, 2023
@GitHK GitHK deleted the pr-osparc-flaky-fixes branch July 24, 2023 05:41
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 8, 2023
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky tests/long_running_tasks/test_long_running_tasks_task.py::test_checked_once_task_is_auto_removed
3 participants