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