From bbf44ecf1b33196a8302152a37fe10df2bbb359d Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 12 Nov 2009 11:36:51 +0100 Subject: [PATCH] Redis test will not fail the SAVE test even if a background save is in progress --- test-redis.tcl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test-redis.tcl b/test-redis.tcl index 98f806d6..1ca5e21a 100644 --- a/test-redis.tcl +++ b/test-redis.tcl @@ -533,6 +533,17 @@ proc main {server port} { } {{1 2 3} 0} test {SAVE - make sure there are all the types as values} { + # Wait for a background saving in progress to terminate + while 1 { + set i [$r info] + if {[string match {*bgsave_in_progress:1*} $i]} { + puts -nonewline "\nWaiting for background save to finish... " + flush stdout + after 100 + } else { + break + } + } $r lpush mysavelist hello $r lpush mysavelist world $r set myemptykey {}