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

🐛 fixes hanging servicelib tests #5942

Merged

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Jun 14, 2024

What do these changes do?

This was very subtle to figure out. Sometimes, when trying to shutdown the RedisClientSDK the ping would hang and would impede cancellation of the task. To avoid this we need to lower the timeout of the connection.

Changes:

  • ♻️ refactored test_lock_acquired_in_parallel_to_update_same_resource to use sperate connections for each lock acquired in parallel
  • ♻️ tests relying on RedisClientSDK will now fail instead of hanging (added timeout when closing)
  • 🐛 fixed race condition with fixture get_redis_client_sdk, when used in parallel it could remove some data. Cleanup is done at fixture exit
  • ♻️ enabled test_exclusive_parallel_lock_is_released_and_reacquired

Possible causes that were not it

  • ping command inside RedisClientSDK could have hanged, but was not the cause.

Related issue/s

How to test

Dev-ops checklist

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 91.03990% with 137 lines in your changes missing coverage. Please review.

Project coverage is 88.0%. Comparing base (cafbf96) to head (b5fda06).
Report is 342 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5942      +/-   ##
=========================================
+ Coverage    84.5%   88.0%    +3.5%     
=========================================
  Files          10    1438    +1428     
  Lines         214   59126   +58912     
  Branches       25    1409    +1384     
=========================================
+ Hits          181   52080   +51899     
- Misses         23    6750    +6727     
- Partials       10     296     +286     
Flag Coverage Δ
integrationtests 64.7% <40.0%> (?)
unittests 86.1% <91.0%> (+1.5%) ⬆️

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

Files Coverage Δ
packages/aws-library/src/aws_library/ec2/client.py 100.0% <100.0%> (ø)
packages/aws-library/src/aws_library/ec2/models.py 88.8% <100.0%> (ø)
...ackages/aws-library/src/aws_library/s3/__init__.py 100.0% <100.0%> (ø)
...kages/aws-library/src/aws_library/s3/_constants.py 100.0% <100.0%> (ø)
packages/aws-library/src/aws_library/s3/_errors.py 100.0% <100.0%> (ø)
packages/aws-library/src/aws_library/s3/_models.py 100.0% <100.0%> (ø)
packages/aws-library/src/aws_library/s3/_utils.py 100.0% <100.0%> (ø)
...ckages/aws-library/src/aws_library/ssm/__init__.py 100.0% <100.0%> (ø)
...ackages/aws-library/src/aws_library/ssm/_errors.py 100.0% <100.0%> (ø)
...src/models_library/api_schemas_catalog/__init__.py 100.0% <100.0%> (ø)
... and 104 more

... and 1304 files with indirect coverage changes

@GitHK GitHK changed the title 🐛 broken test 🐛 fixes hanging servicelib tests Jun 14, 2024
@GitHK GitHK self-assigned this Jun 14, 2024
@GitHK GitHK marked this pull request as ready for review June 14, 2024 08:34
@GitHK GitHK requested a review from pcrespov as a code owner June 14, 2024 08:34
@GitHK GitHK marked this pull request as draft June 14, 2024 08:47
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.

Still draft? description also seems incomplete

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.

let us know when this is ready.

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Cool! Thanks a lot for the fix 👍

@GitHK GitHK modified the milestones: South Island Iced Tea, Tom Bombadil Jul 10, 2024
Andrei Neagu added 4 commits July 12, 2024 15:00
@GitHK GitHK merged commit 3b512b7 into ITISFoundation:master Jul 15, 2024
56 checks passed
@GitHK GitHK deleted the pr-osparc-fix-broken-deferred-tasks-test branch July 15, 2024 05:48
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Jul 17, 2024
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 15, 2024
67 tasks
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.

5 participants