Commit 1685e1ec authored by Janoš Guljaš's avatar Janoš Guljaš Committed by GitHub

fix TestPinGC localstore test data race on test hook (#207)

parent 9c84e3ff
...@@ -149,12 +149,12 @@ func TestPinGC(t *testing.T) { ...@@ -149,12 +149,12 @@ func TestPinGC(t *testing.T) {
var closed chan struct{} var closed chan struct{}
testHookCollectGarbageChan := make(chan uint64) testHookCollectGarbageChan := make(chan uint64)
defer setTestHookCollectGarbage(func(collectedCount uint64) { t.Cleanup(setTestHookCollectGarbage(func(collectedCount uint64) {
select { select {
case testHookCollectGarbageChan <- collectedCount: case testHookCollectGarbageChan <- collectedCount:
case <-closed: case <-closed:
} }
})() }))
db := newTestDB(t, &Options{ db := newTestDB(t, &Options{
Capacity: dbCapacity, Capacity: dbCapacity,
......
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