From eaa71ff305b15e7b167e9bdabb70b1346b5fe5a5 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Fri, 6 Oct 2023 08:20:46 +0000 Subject: [PATCH] Increase HandlerUtilsTest timeout to 500ms The test is currently 1~3% flaky with a 200ms timeout, in particular it may fail if a GC runs while waitForIdle is running. Increase the timeout to 1s, which should be enough to cover such cases. Change-Id: Ic6d4ff18fb81feb09639442196cdef3c5cfdf30c Fixes: 302949876 Test: TH --- .../tests/unit/src/com/android/testutils/HandlerUtilsTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticlibs/tests/unit/src/com/android/testutils/HandlerUtilsTest.kt b/staticlibs/tests/unit/src/com/android/testutils/HandlerUtilsTest.kt index 0f6fa48baf..440b836cc9 100644 --- a/staticlibs/tests/unit/src/com/android/testutils/HandlerUtilsTest.kt +++ b/staticlibs/tests/unit/src/com/android/testutils/HandlerUtilsTest.kt @@ -27,7 +27,7 @@ import org.junit.runner.RunWith import org.junit.runners.JUnit4 private const val ATTEMPTS = 50 // Causes testWaitForIdle to take about 150ms on aosp_crosshatch-eng -private const val TIMEOUT_MS = 200 +private const val TIMEOUT_MS = 1000 @RunWith(JUnit4::class) class HandlerUtilsTest {