Fix test with race
This commit is contained in:
+2
-2
@@ -279,10 +279,10 @@ func TestPoolCloseBlocksUntilAllResourcesReleasedAndClosed(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, res := range resources {
|
for _, res := range resources {
|
||||||
go func() {
|
go func(res *puddle.Resource) {
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
res.Release()
|
res.Release()
|
||||||
}()
|
}(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Close()
|
p.Close()
|
||||||
|
|||||||
Reference in New Issue
Block a user