test(coverage): lane 2 — sync, workers, transport & auth to >=95% #247

Closed
opened 2026-07-03 17:57:42 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-03 17:57:42 +00:00 (Migrated from github.com)

Strangler lane 2 of 6 (coverage → >95%; see lane 1 for the approach). Depends on #192 / PR #241.

Scope: data/sync/** — SyncWorker, BackfillWorker, PruneWorker, SendWorker, MailSyncer, MailBackfiller, SyncScheduler, SyncResourcePolicy — plus the IMAP/SMTP transport layer and auth/** (OAuth token exchange).

Test approach: JVM unit + GreenMail in-process IMAP/SMTP for transport/sync; mock the OAuth token endpoints. Construct CoroutineWorkers via the existing JVM pattern (see PruneWorkerTest/SyncWorkerTest — relaxed mockk context/params, dagger.Lazy deps, cache-lock-gate → retry). Cover retry/failure/backoff, battery/network constraints, and the cache-lock gate.

Target: ≥95% for the packages in scope; then ratchet the floor.

**Strangler lane 2 of 6** (coverage → >95%; see lane 1 for the approach). Depends on #192 / PR #241. **Scope:** `data/sync/**` — SyncWorker, BackfillWorker, PruneWorker, SendWorker, MailSyncer, MailBackfiller, SyncScheduler, SyncResourcePolicy — plus the IMAP/SMTP transport layer and `auth/**` (OAuth token exchange). **Test approach:** JVM unit + **GreenMail** in-process IMAP/SMTP for transport/sync; mock the OAuth token endpoints. Construct CoroutineWorkers via the existing JVM pattern (see PruneWorkerTest/SyncWorkerTest — relaxed mockk context/params, `dagger.Lazy` deps, cache-lock-gate → retry). Cover retry/failure/backoff, battery/network constraints, and the cache-lock gate. **Target:** ≥95% for the packages in scope; then ratchet the floor.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#247