Skip to content

Commit

Permalink
Test: be more patient waiting for servers to exit.
Browse files Browse the repository at this point in the history
This should likely fix a false positive when running with the --valgrind
option.
  • Loading branch information
antirez committed Mar 31, 2015
1 parent 66f9393 commit 3868042
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/support/server.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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} {
Expand Down

0 comments on commit 3868042

Please sign in to comment.