summaryrefslogtreecommitdiff
path: root/tests/integration/aof.tcl
diff options
context:
space:
mode:
authorWang Yuan <wangyuan21@baidu.com>2021-10-26 19:08:09 +0800
committerGitHub <noreply@github.com>2021-10-26 14:08:09 +0300
commit37dc2f13b48ca95720384d948cfb1e0b4eec7c18 (patch)
tree1acc4b76317aeddcf844ccf515c9a82ae1e8a787 /tests/integration/aof.tcl
parent43b22f17dc3eb77a255f140fa37765f306541b7a (diff)
downloadredis-37dc2f13b48ca95720384d948cfb1e0b4eec7c18.tar.gz
Fix not waiting for data loading to complete in AOF tests (#9683)
Fix timing issue of a new test introduced in #9326
Diffstat (limited to 'tests/integration/aof.tcl')
-rw-r--r--tests/integration/aof.tcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl
index e697bbed7..3d40f744f 100644
--- a/tests/integration/aof.tcl
+++ b/tests/integration/aof.tcl
@@ -444,6 +444,7 @@ tags {"aof external:skip"} {
start_server_aof [list dir $server_path] {
test {Successfully load AOF which has timestamp annotations inside} {
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
+ wait_done_loading $c
assert_equal "bar1" [$c get foo1]
assert_equal "bar2" [$c get foo2]
assert_equal "bar3" [$c get foo3]
@@ -455,6 +456,7 @@ tags {"aof external:skip"} {
exec src/redis-check-aof --truncate-to-timestamp 1628217473 $aof_path
start_server_aof [list dir $server_path] {
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
+ wait_done_loading $c
assert_equal "bar1" [$c get foo1]
assert_equal "bar2" [$c get foo2]
assert_equal "bar3" [$c get foo3]
@@ -464,6 +466,7 @@ tags {"aof external:skip"} {
exec src/redis-check-aof --truncate-to-timestamp 1628217471 $aof_path
start_server_aof [list dir $server_path] {
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
+ wait_done_loading $c
assert_equal "bar1" [$c get foo1]
assert_equal "bar2" [$c get foo2]
assert_equal "" [$c get foo3]
@@ -473,6 +476,7 @@ tags {"aof external:skip"} {
exec src/redis-check-aof --truncate-to-timestamp 1628217470 $aof_path
start_server_aof [list dir $server_path] {
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
+ wait_done_loading $c
assert_equal "bar1" [$c get foo1]
assert_equal "" [$c get foo2]
}