]> git.saurik.com Git - redis.git/commitdiff
fix a test timing issue when running the test over valgrind
authorantirez <antirez@gmail.com>
Mon, 11 Jul 2011 13:44:38 +0000 (15:44 +0200)
committerantirez <antirez@gmail.com>
Mon, 11 Jul 2011 13:44:38 +0000 (15:44 +0200)
tests/unit/other.tcl
tests/unit/type/list.tcl

index 8eebdc6348eb66547e944d20868915b1ea40f9b8..702c291f9a504e832b68ac50f3385e6afa9df021 100644 (file)
@@ -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}
 }
index 8f58cc5fe316d5ca11bfa8bef4cdedffa4c207b5..ff178db4176b2bf68e489f1dc8024ec90d05b2e5 100644 (file)
@@ -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]
     }