From 5a1ba595f17bd2f3d08486cf8e8c24008dec1b61 Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Thu, 3 Dec 2026 11:31:11 +0100 Subject: [PATCH] test(file-manager): stop the large directory filter test timing out the CI The 100ms bound on filtering 10000 entries is a wall clock measurement, and it failed at 147ms in the release job while makepkg was still building next to it, blocking the publication of the package for a test that guards against a superlinear filter, not against a few milliseconds. The limit is now one second, which still catches an implementation that turns the listing into seconds, and the comment says why it is loose. --- kittens/file_manager/main_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kittens/file_manager/main_test.go b/kittens/file_manager/main_test.go index 8af062b..46fa56b 100644 --- a/kittens/file_manager/main_test.go +++ b/kittens/file_manager/main_test.go @@ -376,8 +376,13 @@ func TestFilterEntriesLargeDirectory(t *testing.T) { if len(matches) == 0 { t.Fatal("expected matches in a large directory") } - if elapsed > 100*time.Millisecond { - t.Fatalf("filtering 10000 entries took %s, the limit is 100ms", elapsed) + // The bound is deliberately loose: this guards against the filter becoming + // superlinear (which turns 10000 entries into seconds), not against a few + // extra milliseconds. A wall clock threshold tight enough to measure the + // current implementation fails on a shared machine, where the same test + // went from 15ms to 147ms while makepkg was building next to it. + if elapsed > time.Second { + t.Fatalf("filtering 10000 entries took %s, the limit is 1s", elapsed) } }