From fd83438e0e78e40c4df0278a6d12043bd11cbd3f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 20 Nov 2026 10:35:53 -0800 Subject: [PATCH] Fix flaky fanotify cross-watcher test A file rewrite can produce multiple update notifications across debounce batches. The cross-watcher test only needs to verify delivery to the intended watch and isolation from the other watch. --- tsc/internal/fswatch/fanotify_linux_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tsc/internal/fswatch/fanotify_linux_test.go b/tsc/internal/fswatch/fanotify_linux_test.go index 0bf7672c36754..dea1fb748187e 100644 --- a/tsc/internal/fswatch/fanotify_linux_test.go +++ b/tsc/internal/fswatch/fanotify_linux_test.go @@ -112,8 +112,7 @@ func TestFanotifyCrossWatcherSameFs(t *testing.T) { if err := os.WriteFile(pathA, []byte("changed"), 0o644); err != nil { t.Fatal(err) } - gotA := rA.gather(rA.deadline(), 200*time.Millisecond) - assertEventSet(t, gotA, []wantEvent{{EventUpdate, pathA}}) + expectContains(t, rA, EventUpdate, pathA) if gotB := rB.drainQuiet(200 * time.Millisecond); len(gotB) != 0 { t.Fatalf("watcher B got phantom events: %v", toWantEvents(gotB))