diff options
author | antirez <antirez@gmail.com> | 2015-03-31 23:43:38 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-03-31 23:43:38 +0200 |
commit | 386804246f35e27a8db0d31fd0badd85cc6ecc04 (patch) | |
tree | 0a53d4fa5ff9a5cfa913d3dedb4abb6dfceeb1fc | |
parent | 66f9393ee4d526e27df38e7b610daef30a4c89bd (diff) | |
download | redis-386804246f35e27a8db0d31fd0badd85cc6ecc04.tar.gz |
Test: be more patient waiting for servers to exit.
This should likely fix a false positive when running with the --valgrind
option.
-rw-r--r-- | tests/support/server.tcl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 317b40a84..e5c31af28 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -54,10 +54,15 @@ proc kill_server config { # kill server and wait for the process to be totally exited catch {exec kill $pid} + if {$::valgrind} { + set max_wait 60000 + } else { + set max_wait 10000 + } while {[is_alive $config]} { incr wait 10 - if {$wait >= 5000} { + if {$wait >= $max_wait} { puts "Forcing process $pid to exit..." catch {exec kill -KILL $pid} } elseif {$wait % 1000 == 0} { |