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) } }