From 2916bb4be85e6d749a8216f8788f02c80b1f21ff Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Tue, 27 Oct 2020 15:36:42 +0800 Subject: [PATCH] Fix timing dependence in replication tcl tests (#7969) Remove 'fork child $pid' log in replication.tcl --- tests/integration/replication.tcl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index f7f8d241b..fb0b9b965 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -725,7 +725,6 @@ test "diskless replication child being killed is collected" { # simulate the OOM killer or anyone else kills the child set fork_child_pid [get_child_pid -1] - puts "fork child is $fork_child_pid" exec kill -9 $fork_child_pid # wait for the parent to notice the child have exited @@ -812,7 +811,9 @@ test {Kill rdb child process if its dumping RDB is not useful} { # Wait for starting child wait_for_condition 50 100 { - [s 0 rdb_bgsave_in_progress] == 1 + ([s 0 rdb_bgsave_in_progress] == 1) && + ([string match "*wait_bgsave*" [s 0 slave0]]) && + ([string match "*wait_bgsave*" [s 0 slave1]]) } else { fail "rdb child didn't start" } @@ -837,7 +838,9 @@ test {Kill rdb child process if its dumping RDB is not useful} { $slave1 slaveof $master_host $master_port $slave2 slaveof $master_host $master_port wait_for_condition 50 100 { - [s 0 rdb_bgsave_in_progress] == 1 + ([s 0 rdb_bgsave_in_progress] == 1) && + ([string match "*wait_bgsave*" [s 0 slave0]]) && + ([string match "*wait_bgsave*" [s 0 slave1]]) } else { fail "rdb child didn't start" }