diff options
author | antirez <antirez@gmail.com> | 2014-05-22 16:03:46 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-06-21 16:04:20 +0200 |
commit | 061fd99767b7ec66578d6ecc23b75c31a7b4728c (patch) | |
tree | 7c7be42b7d5871de3607922482dbe06ab61a1a60 | |
parent | 2b805ce119a705c713778a4ca34819918b7584f5 (diff) | |
download | redis-061fd99767b7ec66578d6ecc23b75c31a7b4728c.tar.gz |
Test: AOF test false positive when running in slow hosts.
The bug was triggered by running the test with Valgrind (which is a lot
slower and more sensible to timing issues) after the recent changes
that made Redis more promptly able to reply with the -LOADING error.
-rw-r--r-- | tests/integration/aof.tcl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index f255d7ec1..9a24a96bd 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -91,8 +91,13 @@ tags {"aof"} { assert_equal 1 [is_alive $srv] } - test "Fixed AOF: Keyspace should contain values that were parsable" { + test "Fixed AOF: Keyspace should contain values that were parsable" { set client [redis [dict get $srv host] [dict get $srv port]] + wait_for_condition 50 100 { + [catch {$client ping} e] == 0 + } else { + fail "Loading DB is taking too much time." + } assert_equal "hello" [$client get foo] assert_equal "" [$client get bar] } @@ -112,6 +117,11 @@ tags {"aof"} { test "AOF+SPOP: Set should have 1 member" { set client [redis [dict get $srv host] [dict get $srv port]] + wait_for_condition 50 100 { + [catch {$client ping} e] == 0 + } else { + fail "Loading DB is taking too much time." + } assert_equal 1 [$client scard set] } } @@ -130,6 +140,11 @@ tags {"aof"} { test "AOF+EXPIRE: List should be empty" { set client [redis [dict get $srv host] [dict get $srv port]] + wait_for_condition 50 100 { + [catch {$client ping} e] == 0 + } else { + fail "Loading DB is taking too much time." + } assert_equal 0 [$client llen list] } } |