mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 23:58:47 +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
|
@Test
|
||||||
fun testTemporaryStore() {
|
fun testTemporaryStore() {
|
||||||
// Keep the data 30 millis
|
// Keep the data 300 millis
|
||||||
val store = TemporaryStore<String>(30)
|
val store = TemporaryStore<String>(300)
|
||||||
|
|
||||||
store.data = "test"
|
store.data = "test"
|
||||||
store.data shouldBe "test"
|
store.data shouldBe "test"
|
||||||
sleep(15)
|
sleep(10)
|
||||||
store.data shouldBe "test"
|
store.data shouldBe "test"
|
||||||
sleep(20)
|
sleep(300)
|
||||||
store.data shouldBe null
|
store.data shouldBe null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user