Files
sharedinbox/lib
Thomas SharedInboxandClaude Sonnet 4.6 5fc26057d7 test: cover _resolveDatabasePath retry logic to catch budget regressions (#167)
Issue #166 exposed that the retry budget in _resolveDatabasePath() was too
small for slow Android devices, but no unit test exercised that code path.

Expose two testing helpers (resolveDatabasePathForTesting /
resetDatabasePathForTesting) and add two new tests using fake_async:

- verifies the retry loop eventually succeeds after transient failures
  (a _SucceedAfterNPathProvider that fails N times then returns a path)
- verifies the function throws PlatformException with the right message
  after exhausting all retries

Both tests advance fake time instead of waiting real-world milliseconds,
so they run in < 1 ms each.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:29:30 +02:00
..