mirror of
https://github.com/redis/go-redis.git
synced 2025-12-02 06:22:31 +03:00
fix benchmark test
This commit is contained in:
@@ -83,14 +83,14 @@ func BenchmarkPoolGetRemove(b *testing.B) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
|
rmvErr := errors.New("Bench test remove")
|
||||||
b.RunParallel(func(pb *testing.PB) {
|
b.RunParallel(func(pb *testing.PB) {
|
||||||
for pb.Next() {
|
for pb.Next() {
|
||||||
cn, err := connPool.Get(ctx)
|
cn, err := connPool.Get(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
connPool.Remove(ctx, cn, errors.New("Bench test remove"))
|
connPool.Remove(ctx, cn, rmvErr)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user