mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02:00
test(filer): keep in-flight downloads during cache trimming
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user