From 42ce58ed85bda8268a44ce46f1e0ca7993e82363 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Fri, 4 Jul 2014 13:36:49 +0300 Subject: [PATCH] sentinel_test: increase timeout to make build more reliable. --- sentinel_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sentinel_test.go b/sentinel_test.go index 0e6ef43..e2f93ad 100644 --- a/sentinel_test.go +++ b/sentinel_test.go @@ -14,7 +14,7 @@ import ( func startRedis(port string) (*exec.Cmd, error) { cmd := exec.Command("redis-server", "--port", port) - if true { + if false { cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr } @@ -26,7 +26,7 @@ func startRedis(port string) (*exec.Cmd, error) { func startRedisSlave(port, slave string) (*exec.Cmd, error) { cmd := exec.Command("redis-server", "--port", port, "--slaveof", "127.0.0.1", slave) - if true { + if false { cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr } @@ -151,7 +151,7 @@ func TestSentinel(t *testing.T) { master.Shutdown() // Wait for Redis sentinel to elect new master. - time.Sleep(3 * time.Second) + time.Sleep(5 * time.Second) // Check that client picked up new master. val, err = client.Get("foo").Result() @@ -167,7 +167,7 @@ var sentinelConf = ` port {{ .Port }} sentinel monitor {{ .MasterName }} 127.0.0.1 {{ .MasterPort }} 1 -sentinel down-after-milliseconds {{ .MasterName }} 200 -sentinel failover-timeout {{ .MasterName }} 400 +sentinel down-after-milliseconds {{ .MasterName }} 1000 +sentinel failover-timeout {{ .MasterName }} 2000 sentinel parallel-syncs {{ .MasterName }} 1 `