1
0
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:
Nedyalko Dyakov
2025-10-29 16:21:21 +02:00
parent 43eeae70ab
commit 2965e3d35c

View File

@@ -83,14 +83,14 @@ func BenchmarkPoolGetRemove(b *testing.B) {
})
b.ResetTimer()
rmvErr := errors.New("Bench test remove")
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
cn, err := connPool.Get(ctx)
if err != nil {
b.Fatal(err)
}
connPool.Remove(ctx, cn, errors.New("Bench test remove"))
connPool.Remove(ctx, cn, rmvErr)
}
})
})