Skip to content

Feat/photo worker tests - #70

Merged
ademboukabes merged 3 commits into
developfrom
feat/photo-worker-tests
Aug 3, 2026
Merged

Feat/photo worker tests#70
ademboukabes merged 3 commits into
developfrom
feat/photo-worker-tests

Conversation

@ademboukabes

Copy link
Copy Markdown
Collaborator

This PR adds comprehensive unit tests for the async PhotoWorker (app/worker/photo_worker/main.py) to secure the background processing pipeline.

Key Additions:

  • Fully mocked infrastructure: Safely isolates the tests from MinIO, NATS, Postgres, and the AI Model.
  • Success Workflows: Covers logic for 0 faces, single faces, and group faces (including Firebase push notifications generation).
  • Error Boundaries: Verifies graceful failure handling when MinIO network errors or AI crashes (e.g. Out Of Memory) occur.
  • Retry Logic: Tests the exponential backoff retry mechanism for MinIO downloads.

This boosts the test coverage for the core AI background tasks and prevents future regressions.

@ademboukabes
ademboukabes merged commit e2390c1 into develop Aug 3, 2026
2 checks passed
@ademboukabes
ademboukabes deleted the feat/photo-worker-tests branch August 3, 2026 16:00
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.

2 participants