From 208ca701b823f8854ef641e84814f86509979618 Mon Sep 17 00:00:00 2001 From: Nedyalko Dyakov Date: Fri, 29 Aug 2025 22:00:24 +0300 Subject: [PATCH] disable logger for cleaner test output --- async_handoff_integration_test.go | 4 ++++ internal/pool/pool_test.go | 5 +---- main_test.go | 11 +---------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/async_handoff_integration_test.go b/async_handoff_integration_test.go index 30afa71d..8ea74af3 100644 --- a/async_handoff_integration_test.go +++ b/async_handoff_integration_test.go @@ -346,3 +346,7 @@ func TestEventDrivenHandoffIntegration(t *testing.T) { } }) } + +func init() { + SetLogger(&VoidLogger{}) +} diff --git a/internal/pool/pool_test.go b/internal/pool/pool_test.go index c044506c..e3c7ed38 100644 --- a/internal/pool/pool_test.go +++ b/internal/pool/pool_test.go @@ -11,8 +11,6 @@ import ( . "github.com/bsm/ginkgo/v2" . "github.com/bsm/gomega" "github.com/redis/go-redis/v9" - "github.com/redis/go-redis/v9/internal" - "github.com/redis/go-redis/v9/internal/pool" ) @@ -440,6 +438,5 @@ var _ = Describe("race", func() { }) func init() { - filterLogger := internal.NewFilterLogger([]string{"test panic", "was not able to get a healthy connection after"}) - redis.SetLogger(filterLogger) + redis.SetLogger(&redis.VoidLogger{}) } diff --git a/main_test.go b/main_test.go index 9f9d0580..d88523dc 100644 --- a/main_test.go +++ b/main_test.go @@ -13,7 +13,6 @@ import ( . "github.com/bsm/ginkgo/v2" . "github.com/bsm/gomega" "github.com/redis/go-redis/v9" - "github.com/redis/go-redis/v9/internal" ) const ( @@ -103,15 +102,7 @@ var _ = BeforeSuite(func() { fmt.Printf("RCEDocker: %v\n", RCEDocker) fmt.Printf("REDIS_VERSION: %.1f\n", RedisVersion) fmt.Printf("CLIENT_LIBS_TEST_IMAGE: %v\n", os.Getenv("CLIENT_LIBS_TEST_IMAGE")) - - filterLogger := internal.NewFilterLogger([]string{ - "ERR unknown subcommand 'maint_notifications'", - "test panic", - "sentinel:", - "hitless:", - "pubsub:", - }) - redis.SetLogger(filterLogger) + redis.SetLogger(&redis.VoidLogger{}) if RedisVersion < 7.0 || RedisVersion > 9 { panic("incorrect or not supported redis version")