diff --git a/commands.go b/commands.go index f7946c5..b29e4f3 100644 --- a/commands.go +++ b/commands.go @@ -2307,7 +2307,7 @@ func (c cmdable) SlaveOf(ctx context.Context, host, port string) *StatusCmd { return cmd } -func (c cmdable) SlowLog(ctx context.Context, num int64) *SlowLogCmd { +func (c cmdable) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd { n := strconv.FormatInt(num, 10) cmd := NewSlowLogCmd(context.Background(), "slowlog", "get", n) _ = c(ctx, cmd) diff --git a/commands_test.go b/commands_test.go index 2040dec..ce26cfa 100644 --- a/commands_test.go +++ b/commands_test.go @@ -4014,7 +4014,7 @@ var _ = Describe("Commands", func() { }) }) - Describe("SlowLog", func() { + Describe("SlowLogGet", func() { It("returns slow query result", func() { const key = "slowlog-log-slower-than" @@ -4027,7 +4027,7 @@ var _ = Describe("Commands", func() { client.Set(ctx, "test", "true", 0) - result, err := client.SlowLog(ctx, -1).Result() + result, err := client.SlowLogGet(ctx, -1).Result() Expect(err).NotTo(HaveOccurred()) Expect(len(result)).NotTo(BeZero()) }) diff --git a/example_test.go b/example_test.go index 63d9f8c..e24698e 100644 --- a/example_test.go +++ b/example_test.go @@ -511,7 +511,7 @@ func ExampleNewUniversalClient_cluster() { rdb.Ping(ctx) } -func ExampleClient_SlowLog() { +func ExampleClient_SlowLogGet() { const key = "slowlog-log-slower-than" old := rdb.ConfigGet(ctx, key).Val() @@ -524,7 +524,7 @@ func ExampleClient_SlowLog() { rdb.Set(ctx, "test", "true", 0) - result, err := rdb.SlowLog(ctx, -1).Result() + result, err := rdb.SlowLogGet(ctx, -1).Result() if err != nil { panic(err) } diff --git a/options.go b/options.go index b44e44c..1be7c8b 100644 --- a/options.go +++ b/options.go @@ -104,9 +104,6 @@ type Options struct { // Enables read only queries on slave nodes. readOnly bool - // Enables read only queries on redis replicas in sentinel mode - sentinelReadOnly bool - // TLS Config to use. When set TLS will be negotiated. TLSConfig *tls.Config diff --git a/sentinel_test.go b/sentinel_test.go index 485436c..c45be73 100644 --- a/sentinel_test.go +++ b/sentinel_test.go @@ -78,11 +78,6 @@ var _ = Describe("Sentinel", func() { return master.Ping(ctx).Err() }, "15s", "100ms").Should(HaveOccurred()) - // Wait for Redis sentinel to elect new master. - Eventually(func() string { - return sentinelSlave1.Info(ctx).Val() + sentinelSlave2.Info(ctx).Val() - }, "15s", "100ms").Should(ContainSubstring("role:master")) - // Check that client picked up new master. Eventually(func() error { return client.Get(ctx, "foo").Err() @@ -183,11 +178,6 @@ var _ = Describe("NewFailoverClusterClient", func() { return sentinelMaster.Ping(ctx).Err() }, "15s", "100ms").Should(HaveOccurred()) - // Wait for Redis sentinel to elect new master. - Eventually(func() string { - return sentinelSlave1.Info(ctx).Val() + sentinelSlave2.Info(ctx).Val() - }, "15s", "100ms").Should(ContainSubstring("role:master")) - // Check that client picked up new master. Eventually(func() error { return client.Get(ctx, "foo").Err()