mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
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:
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()
|
||||
|
||||
Reference in new issue
Block a user