From 0717e3aa16fc81ff0e5a9dfacc93655edbdaec6f Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 11 Jul 2011 15:44:38 +0200 Subject: [PATCH] fix a test timing issue when running the test over valgrind --- tests/unit/other.tcl | 1 + tests/unit/type/list.tcl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/unit/other.tcl b/tests/unit/other.tcl index 8eebdc634..702c291f9 100644 --- a/tests/unit/other.tcl +++ b/tests/unit/other.tcl @@ -247,6 +247,7 @@ start_server {tags {"other"}} { } {0 0} test {Perform a final SAVE to leave a clean DB on disk} { + waitForBgsave r r save } {OK} } diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index 8f58cc5fe..ff178db41 100644 --- a/tests/unit/type/list.tcl +++ b/tests/unit/type/list.tcl @@ -148,8 +148,11 @@ start_server { test "BLPOP with variadic LPUSH" { set rd [redis_deferring_client] r del blist target + if {$::valgrind} {after 100} $rd blpop blist 0 + if {$::valgrind} {after 100} assert_equal 2 [r lpush blist foo bar] + if {$::valgrind} {after 100} assert_equal {blist foo} [$rd read] assert_equal bar [lindex [r lrange blist 0 -1] 0] }