From 55b934b02efe1eef993577676487c31645d88e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 7 Jul 2026 12:25:03 +0200 Subject: [PATCH] tests/fpi-device: Increase warmup/cooldown test timeouts The slack of 250ms wasn't enough on loaded CI systems, causing frequent flaky failures (e.g. 2276ms actual vs 2250ms limit, or 2294ms vs 2250ms). Double the slacks to 500ms for the 2s transitions and 1000ms for the 5s transition to absorb system load noise while still catching real timing regressions. --- tests/test-fpi-device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test-fpi-device.c b/tests/test-fpi-device.c index 71a9f75d..0d075e78 100644 --- a/tests/test-fpi-device.c +++ b/tests/test-fpi-device.c @@ -2875,14 +2875,14 @@ test_driver_identify_warmup_cooldown (void) g_main_context_iteration (NULL, TRUE); g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_WARM); g_assert_false (g_cancellable_is_cancelled (fpi_device_get_cancellable (device))); - g_assert_cmpint (g_get_monotonic_time () - start_time, <, 0 + 250000); + g_assert_cmpint (g_get_monotonic_time () - start_time, <, 0 + 500000); /* we reach hot 2 seconds later */ while (fp_device_get_temperature (device) == FP_TEMPERATURE_WARM) g_main_context_iteration (NULL, TRUE); g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_HOT); g_assert_true (g_cancellable_is_cancelled (fpi_device_get_cancellable (device))); - g_assert_cmpint (g_get_monotonic_time () - start_time, <, 2000000 + 250000); + g_assert_cmpint (g_get_monotonic_time () - start_time, <, 2000000 + 500000); /* cancel vfunc will be called now */ g_assert (fake_dev->last_called_function == NULL); @@ -2909,12 +2909,12 @@ test_driver_identify_warmup_cooldown (void) while (fp_device_get_temperature (device) == FP_TEMPERATURE_HOT) g_main_context_iteration (NULL, TRUE); g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_WARM); - g_assert_cmpint (g_get_monotonic_time () - start_time, <, 2000000 + 250000); + g_assert_cmpint (g_get_monotonic_time () - start_time, <, 2000000 + 500000); while (fp_device_get_temperature (device) == FP_TEMPERATURE_WARM) g_main_context_iteration (NULL, TRUE); g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_COLD); - g_assert_cmpint (g_get_monotonic_time () - start_time, <, 5000000 + 500000); + g_assert_cmpint (g_get_monotonic_time () - start_time, <, 5000000 + 1000000); } static void