fix: the stalled-download cancel test gives a loaded CI runner time to tear the transfer down

The cancel and the download's return each had 2 s, which a busy release-test runner missed while the test passes locally every time. The held server body still guarantees the download only returns because of the cancel.
This commit is contained in:
ovurrsl committed 2026-10-25 16:29:57 +03:00
1 parent b2185be039
commit 9119ae96a5
1 file changed
+2 -2
@@ -206,8 +206,8 @@ class DownloaderResumeTest {
val result = executor.submit<Boolean> { Downloader.downloadFile(url, target, true, null, cancellation, null) }
assertTrue("server sent the first chunk", bodyStarted.await(2, TimeUnit.SECONDS))
val cancelled = cancelExecutor.submit { cancellation.cancel() }
cancelled.get(2, TimeUnit.SECONDS)
assertFalse("cancelled download", result.get(2, TimeUnit.SECONDS))
cancelled.get(10, TimeUnit.SECONDS)
assertFalse("cancelled download", result.get(10, TimeUnit.SECONDS))
assertEquals(listOf<String?>(null), requests.toList())
} finally {
continueBody.countDown()