appstore: fix stale hit count in truncated-download test
- Commit
2c116addb4834bf3f8b02d66d2efe54dd0631c34- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-14 23:09 UTC (21 days ago)
- Parents
800c8ef
The test expected three downloads (up-front download, size-check download, truncation retry), but the commit that stopped downloading the base APK twice per install removed the redundant up-front download, leaving downloadVerified's download plus its single truncation retry: two requests. The production behaviour is correct (one retry, then the size error refuses the install); only the count and its comment were stale. The refusal and 'expected bytes' assertions are unchanged. Verified: targeted :appstore:testDevUnitTest run (see final full-suite run).
Diff
appstore/src/test/java/com/vayunmathur/appstore/data/installer/InstallCoordinatorDownloadTest.kt
diff --git a/appstore/src/test/java/com/vayunmathur/appstore/data/installer/InstallCoordinatorDownloadTest.kt b/appstore/src/test/java/com/vayunmathur/appstore/data/installer/InstallCoordinatorDownloadTest.ktindex 284542df40..4739cca2c1 100644--- a/appstore/src/test/java/com/vayunmathur/appstore/data/installer/InstallCoordinatorDownloadTest.kt+++ b/appstore/src/test/java/com/vayunmathur/appstore/data/installer/InstallCoordinatorDownloadTest.kt@@ -139,9 +139,11 @@ class InstallCoordinatorDownloadTest { assertFalse(outcome.started) val rejected = outcome.verification as VerificationResult.Rejected assertTrue(rejected.reason.contains("expected"), rejected.reason)- // The path downloads once up front, again inside the size check,- // and exactly once more as the truncation retry.- assertEquals(before + 3, apkHits.get())+ // downloadVerified downloads once, size-checks, and retries+ // exactly once on truncation: two requests in total. (A third,+ // redundant up-front download was removed by the fix that+ // stopped downloading the base APK twice per install.)+ assertEquals(before + 2, apkHits.get()) } @Test