From 38126c6b4f48b02e88bd846b0eb1955fa33f61f5 Mon Sep 17 00:00:00 2001 From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com> Date: Thu, 9 Jun 2022 21:39:43 +0100 Subject: [PATCH] Refactor test to be more lenient in timing --- .../java/im/vector/app/core/utils/TemporaryStoreTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt b/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt index d8619f1824..71a83f2e9b 100644 --- a/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt +++ b/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt @@ -24,14 +24,14 @@ class TemporaryStoreTest { @Test fun testTemporaryStore() { - // Keep the data 30 millis - val store = TemporaryStore(30) + // Keep the data 300 millis + val store = TemporaryStore(300) store.data = "test" store.data shouldBe "test" - sleep(15) + sleep(10) store.data shouldBe "test" - sleep(20) + sleep(300) store.data shouldBe null } }