From 062e0d54ab14586b64eb00025b22a8b73dfd2985 Mon Sep 17 00:00:00 2001 From: Qasim Date: Fri, 10 Jul 2026 09:00:47 -0400 Subject: [PATCH] test(air): bump syncEmails lock test deadline 20s->90s to fix CI flake TestSyncEmails_DoesNotHoldRuntimeLockAcrossFetch raced a 20s wall-clock deadline against the post-fetch sync goroutine finishing. Under the full -race suite on a saturated CI runner the goroutine gets starved past 20s, so the timer fired and failed the test even though the sync completes correctly (~3s locally). The test's real assertion (lock not held across the fetch) is verified earlier via the lockReleased probe; this deadline only reaps the goroutine before cleanup. Bump to 90s for headroom. --- internal/air/handlers_email_cache_runtime_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/air/handlers_email_cache_runtime_test.go b/internal/air/handlers_email_cache_runtime_test.go index 7ef9967..7ed2553 100644 --- a/internal/air/handlers_email_cache_runtime_test.go +++ b/internal/air/handlers_email_cache_runtime_test.go @@ -595,7 +595,7 @@ func TestSyncEmails_DoesNotHoldRuntimeLockAcrossFetch(t *testing.T) { // guarantee this test cares about is that the runtime lock is not held // across the remote fetch, not that the full sync finishes within a tight // local-only deadline. - case <-time.After(20 * time.Second): + case <-time.After(90 * time.Second): t.Fatal("syncEmails did not finish after fetch was released") }