From 6090af686e6b5cf3b8b28c19dc3360f95624065d Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Thu, 6 Oct 2022 13:19:35 +0300 Subject: [PATCH] chore: remove old options --- cluster_test.go | 8 ++++---- options_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cluster_test.go b/cluster_test.go index 1098ab2..72938a2 100644 --- a/cluster_test.go +++ b/cluster_test.go @@ -1354,19 +1354,19 @@ func TestParseClusterURL(t *testing.T) { o: &redis.ClusterOptions{Addrs: []string{"localhost:123", "localhost:1234"}, ReadTimeout: 2 * time.Second, PoolFIFO: true}, }, { test: "DisabledTimeout", - url: "redis://localhost:123?idle_timeout=0", + url: "redis://localhost:123?conn_max_idle_time=0", o: &redis.ClusterOptions{Addrs: []string{"localhost:123"}, ConnMaxIdleTime: -1}, }, { test: "DisabledTimeoutNeg", - url: "redis://localhost:123?idle_timeout=-1", + url: "redis://localhost:123?conn_max_idle_time=-1", o: &redis.ClusterOptions{Addrs: []string{"localhost:123"}, ConnMaxIdleTime: -1}, }, { test: "UseDefault", - url: "redis://localhost:123?idle_timeout=", + url: "redis://localhost:123?conn_max_idle_time=", o: &redis.ClusterOptions{Addrs: []string{"localhost:123"}, ConnMaxIdleTime: 0}, }, { test: "UseDefaultMissing=", - url: "redis://localhost:123?idle_timeout", + url: "redis://localhost:123?conn_max_idle_time", o: &redis.ClusterOptions{Addrs: []string{"localhost:123"}, ConnMaxIdleTime: 0}, }, { test: "InvalidQueryAddr", diff --git a/options_test.go b/options_test.go index f9c69a4..47fa9cb 100644 --- a/options_test.go +++ b/options_test.go @@ -46,18 +46,18 @@ func TestParseURL(t *testing.T) { o: &Options{Addr: "localhost:123", DB: 2, ReadTimeout: 2 * time.Second, PoolFIFO: true}, }, { // special case handling for disabled timeouts - url: "redis://localhost:123/?db=2&idle_timeout=0", + url: "redis://localhost:123/?db=2&conn_max_idle_time=0", o: &Options{Addr: "localhost:123", DB: 2, ConnMaxIdleTime: -1}, }, { // negative values disable timeouts as well - url: "redis://localhost:123/?db=2&idle_timeout=-1", + url: "redis://localhost:123/?db=2&conn_max_idle_time=-1", o: &Options{Addr: "localhost:123", DB: 2, ConnMaxIdleTime: -1}, }, { // absent timeout values will use defaults - url: "redis://localhost:123/?db=2&idle_timeout=", + url: "redis://localhost:123/?db=2&conn_max_idle_time=", o: &Options{Addr: "localhost:123", DB: 2, ConnMaxIdleTime: 0}, }, { - url: "redis://localhost:123/?db=2&idle_timeout", // missing "=" at the end + url: "redis://localhost:123/?db=2&conn_max_idle_time", // missing "=" at the end o: &Options{Addr: "localhost:123", DB: 2, ConnMaxIdleTime: 0}, }, { url: "unix:///tmp/redis.sock",