From 882a155f07acd15c482bcfda11b1691d7c8158f4 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Mon, 22 May 2023 17:52:31 +0200 Subject: [PATCH] Try to fix flaky test by setting a longer timeout in runTest (#442) --- .../impl/detection/RageshakeDetectionPresenterTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt index 369cb0833b..869f0412cd 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt @@ -85,7 +85,7 @@ class RageshakeDetectionPresenterTest { } @Test - fun `present - screenshot with success then dismiss`() = runTest { + fun `present - screenshot with success then dismiss`() = runTest(timeout = 30.seconds) { val screenshotHolder = FakeScreenshotHolder(screenshotUri = null) val rageshake = FakeRageShake(isAvailableValue = true) val rageshakeDataStore = FakeRageshakeDataStore(isEnabled = true) @@ -99,7 +99,7 @@ class RageshakeDetectionPresenterTest { ) moleculeFlow(RecompositionClock.Immediate) { presenter.present() - }.test(timeout = 30.seconds) { + }.test { skipItems(1) val initialState = awaitItem() assertThat(initialState.isStarted).isFalse()