diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index fe146932a..fe4adbe93 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -688,8 +688,11 @@ test {diskless loading short read} { } $master exec } + # wait for loading to stop (fail) + # After a loading successfully, next loop will enter `async_loading` wait_for_condition 1000 1 { + [s -1 async_loading] eq 0 && [s -1 loading] eq 0 } else { fail "Replica didn't disconnect" diff --git a/tests/unit/moduleapi/testrdb.tcl b/tests/unit/moduleapi/testrdb.tcl index 33ec54e04..8d76a11bc 100644 --- a/tests/unit/moduleapi/testrdb.tcl +++ b/tests/unit/moduleapi/testrdb.tcl @@ -114,8 +114,11 @@ tags "modules" { } $master exec } + # wait for loading to stop (fail) + # After a loading successfully, next loop will enter `async_loading` wait_for_condition 1000 1 { + [s -1 async_loading] eq 0 && [s -1 loading] eq 0 } else { fail "Replica didn't disconnect"