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.
This commit is contained in:
parent
17b05afda9
commit
ce37488919
@ -93,6 +93,11 @@ tags {"aof"} {
|
|||||||
|
|
||||||
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]]
|
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 "hello" [$client get foo]
|
||||||
assert_equal "" [$client get bar]
|
assert_equal "" [$client get bar]
|
||||||
}
|
}
|
||||||
@ -112,6 +117,11 @@ tags {"aof"} {
|
|||||||
|
|
||||||
test "AOF+SPOP: Set should have 1 member" {
|
test "AOF+SPOP: Set should have 1 member" {
|
||||||
set client [redis [dict get $srv host] [dict get $srv port]]
|
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]
|
assert_equal 1 [$client scard set]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,6 +140,11 @@ tags {"aof"} {
|
|||||||
|
|
||||||
test "AOF+EXPIRE: List should be empty" {
|
test "AOF+EXPIRE: List should be empty" {
|
||||||
set client [redis [dict get $srv host] [dict get $srv port]]
|
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]
|
assert_equal 0 [$client llen list]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user