Skip to content

Conversation

@drazisil-codecov
Copy link
Contributor

@drazisil-codecov drazisil-codecov commented Dec 8, 2025

  • Introduced tests to verify that blocking_timeout=None causes indefinite blocking, preventing retry logic from functioning correctly.
  • Added a test to ensure that a valid blocking_timeout enables retry logic by raising LockError.
  • Updated BundleAnalysisProcessorTask tests to confirm that the default blocking_timeout is used, preventing indefinite blocking.
  • Adjusted assertions to reflect changes in retry logic and blocking_timeout handling.

Note

Strengthens test coverage around Redis lock acquisition and retry behavior.

  • Adds LockManager tests showing blocking_timeout=None leads to indefinite blocking (no LockError) and that a finite blocking_timeout raises LockError to trigger LockRetry
  • Updates BundleAnalysisProcessorTask tests to assert a non-None default blocking_timeout is used and that lock failures cause Retry (and return previous_result when max retries/attempts are exceeded)
  • Minor logging and backoff assertions retained to validate countdowns and warning/error logs

Written by Cursor Bugbot for commit 3de8d26. This will update automatically on new commits. Configure here.

@drazisil-codecov drazisil-codecov marked this pull request as ready for review December 8, 2025 14:53
@sentry
Copy link

sentry bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.78%. Comparing base (584c5de) to head (3de8d26).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #600   +/-   ##
=======================================
  Coverage   93.78%   93.78%           
=======================================
  Files        1291     1291           
  Lines       46907    46907           
  Branches     1517     1517           
=======================================
  Hits        43991    43991           
  Misses       2607     2607           
  Partials      309      309           
Flag Coverage Δ
workerintegration 59.14% <ø> (ø)
workerunit 91.26% <ø> (ø)

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

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

@codecov-eu
Copy link

codecov-eu bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@thomasrockhu-codecov thomasrockhu-codecov left a comment

Choose a reason for hiding this comment

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

With all the comments, it's really difficult to understand what is going on in the tests, please update to make it human-readable

blocking_timeouts = []
lock_called = threading.Event()

def mock_lock(*args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

probably shouldn't be function in a function here and more of a helper

- Introduced tests to verify that blocking_timeout=None causes indefinite blocking, preventing retry logic from functioning correctly.
- Added a test to ensure that a valid blocking_timeout enables retry logic by raising LockError.
- Updated BundleAnalysisProcessorTask tests to confirm that the default blocking_timeout is used, preventing indefinite blocking.
- Adjusted assertions to reflect changes in retry logic and blocking_timeout handling.
- Removed nested helper functions in test_lock_manager.py
- Used side_effect pattern instead of direct mock assignment
- Simplified threading logic by using lambda in Thread target
- Applied consistent mock patterns across both test files

Addresses review comments from @thomasrockhu-codecov
@drazisil-codecov drazisil-codecov force-pushed the fix/regression-test-blocking-none branch from c003019 to 3de8d26 Compare January 9, 2026 14:04
@drazisil-codecov drazisil-codecov added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit 6915276 Jan 9, 2026
40 checks passed
@drazisil-codecov drazisil-codecov deleted the fix/regression-test-blocking-none branch January 9, 2026 14:58
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