(#1998) - Correctly wait for replication to complete during cancel test