Commit fab0679f authored by acud's avatar acud Committed by GitHub

fix: flaky test (#2164)

parent 68d4cf29
...@@ -1041,7 +1041,7 @@ func TestReserveEvictionWorker(t *testing.T) { ...@@ -1041,7 +1041,7 @@ func TestReserveEvictionWorker(t *testing.T) {
} }
select { select {
case testHookCollectGarbageChan <- collectedCount: case testHookCollectGarbageChan <- collectedCount:
case <-db.close: case <-closed:
} }
})) }))
...@@ -1051,6 +1051,7 @@ func TestReserveEvictionWorker(t *testing.T) { ...@@ -1051,6 +1051,7 @@ func TestReserveEvictionWorker(t *testing.T) {
UnreserveFunc: unres, UnreserveFunc: unres,
}) })
closed = db.close
// insert 10 chunks that fall into the reserve, then // insert 10 chunks that fall into the reserve, then
// expect first one to be evicted // expect first one to be evicted
for i := 0; i < chunkCount; i++ { for i := 0; i < chunkCount; i++ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment