mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 07:44:00 +01:00
Refactor test to be more lenient in timing
This commit is contained in:
parent
8fb6957bc0
commit
38126c6b4f
@ -24,14 +24,14 @@ class TemporaryStoreTest {
|
||||
|
||||
@Test
|
||||
fun testTemporaryStore() {
|
||||
// Keep the data 30 millis
|
||||
val store = TemporaryStore<String>(30)
|
||||
// Keep the data 300 millis
|
||||
val store = TemporaryStore<String>(300)
|
||||
|
||||
store.data = "test"
|
||||
store.data shouldBe "test"
|
||||
sleep(15)
|
||||
sleep(10)
|
||||
store.data shouldBe "test"
|
||||
sleep(20)
|
||||
sleep(300)
|
||||
store.data shouldBe null
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user