From 8d011492a0802c45114bab63c41b7311648632be Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 4 Mar 2014 17:10:29 +0100 Subject: [PATCH] Sentinel test: set less time sensitive defaults. This commit sets the failover timeout to 30 seconds instead of the 180 seconds default, and allows to reconfigure multiple slaves at the same time. This makes tests less sensible to timing, with the result that there are less false positives due to normal behaviors that require time to succeed or to be retried. However the long term solution is probably some way in order to detect when a test failed because of timing issues (for example split brain during leader election) and retry it. --- tests/sentinel-tests/includes/init-tests.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sentinel-tests/includes/init-tests.tcl b/tests/sentinel-tests/includes/init-tests.tcl index 91b179b4..cb359ea1 100644 --- a/tests/sentinel-tests/includes/init-tests.tcl +++ b/tests/sentinel-tests/includes/init-tests.tcl @@ -30,6 +30,8 @@ test "(init) Sentinels can start monitoring a master" { foreach_sentinel_id id { assert {[S $id sentinel master mymaster] ne {}} S $id SENTINEL SET mymaster down-after-milliseconds 2000 + S $id SENTINEL SET mymaster failover-timeout 20000 + S $id SENTINEL SET mymaster parallel-syncs 10 } }