Skip to content

fix: infrastructure unit tests#2478

Closed
SatoryKono wants to merge 1 commit intomainfrom
fix-infrastructure-tests-5165692915446266377
Closed

fix: infrastructure unit tests#2478
SatoryKono wants to merge 1 commit intomainfrom
fix-infrastructure-tests-5165692915446266377

Conversation

@SatoryKono
Copy link
Owner

Fixing unit test failures in the BioETL infrastructure module.

Issues addressed:

  1. tests/unit/infrastructure/adapters/test_client_retry_mixin.py tests were failing because _can_retry and _record_request_metrics were called as methods on client, when they are now module-level helper functions in client_retry_mixin.py.
  2. tests/unit/infrastructure/storage/test_atomic.py and test_metadata_writer.py tests were failing due to a hardcoded non-retryable permission error (OSError(13)) in the mocked file replace function on non-Windows filesystems, which has been corrected to use the globally retryable error (OSError(16)).

PR created automatically by Jules for task 5165692915446266377 started by @SatoryKono

- Updated `tests/unit/infrastructure/adapters/test_client_retry_mixin.py` to import and call `_can_retry` and `_record_request_metrics` from the module directly, as these were refactored into module-level functions in `src/bioetl/infrastructure/adapters/http/client_retry_mixin.py`.
- Fixed `test_atomic.py` and `test_metadata_writer.py` mocks `flaky_replace` to throw a cross-platform retryable error `OSError(16, "Device or resource busy")` instead of `OSError(13)`, restoring full test execution on non-Windows FS.

Co-authored-by: SatoryKono <13055362+SatoryKono@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@SatoryKono
Copy link
Owner Author

Closing: stale branch, content outdated or superseded by main.

@SatoryKono
Copy link
Owner Author

Closing: stale, conflicts with P3/P5 optimizations.

@SatoryKono
Copy link
Owner Author

Closing: stale, conflicts with P3/P5.

@SatoryKono SatoryKono closed this Mar 8, 2026
@SatoryKono SatoryKono deleted the fix-infrastructure-tests-5165692915446266377 branch March 8, 2026 11:09
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.

1 participant