mirror of
https://github.com/redis/go-redis.git
synced 2025-09-08 19:52:07 +03:00
disable logger for cleaner test output
This commit is contained in:
@@ -346,3 +346,7 @@ func TestEventDrivenHandoffIntegration(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func init() {
|
||||
SetLogger(&VoidLogger{})
|
||||
}
|
||||
|
@@ -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{})
|
||||
}
|
||||
|
11
main_test.go
11
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")
|
||||
|
Reference in New Issue
Block a user