mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-04 01:00:44 +02:00
perf(downloads): bound native queue state
This commit is contained in:
@@ -160,4 +160,14 @@ class NativeWorkerPolicyTest {
|
||||
assertEquals("failed", NativeWorkerPolicy.statusAfterWorkerStop("failed"))
|
||||
assertEquals("skipped", NativeWorkerPolicy.statusAfterWorkerStop("skipped"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun acknowledgedPayloadsAreReleasedOnlyForTerminalItems() {
|
||||
listOf("completed", "failed", "skipped").forEach { status ->
|
||||
assertTrue(NativeWorkerPolicy.isTerminalStatus(status))
|
||||
}
|
||||
listOf("queued", "preparing", "downloading", "finalizing").forEach { status ->
|
||||
assertFalse(NativeWorkerPolicy.isTerminalStatus(status))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user