test(filer): keep in-flight downloads during cache trimming

This commit is contained in:
Chris Lu
2026-09-07 22:33:01 -07:00
parent 3ee493c49d
commit bef10e5249
+7
View File
@@ -70,6 +70,13 @@ func TestChunkGroupReaderCacheMemory(t *testing.T) {
for i := 0; i < tt.chunks; i++ {
<-started
}
rc.trim()
rc.Lock()
downloading := len(rc.downloaders)
rc.Unlock()
if downloading != tt.chunks {
t.Errorf("trim evicted in-flight downloads: got %d, want %d", downloading, tt.chunks)
}
close(gate)
readers.Wait()
}