mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08: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