Skip to content

Commit

Permalink
Fix Test rdb-channel psync established after rdb load
Browse files Browse the repository at this point in the history
Signed-off-by: naglera <[email protected]>
  • Loading branch information
naglera committed Jun 10, 2024
1 parent d93cb02 commit 8b4aba0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions tests/integration/repl-rdb-channel.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,13 @@ start_server {tags {"repl rdb-channel external:skip"}} {
test "Test rdb-channel psync established after rdb load" {
$replica slaveof $master_host $master_port

wait_for_value_to_propegate_to_replica $master $replica "key1"

verify_replica_online $master 0 500
wait_for_condition 50 1000 {
[status $replica master_link_status] == "up"
} else {
fail "Replica is not synced"
}
wait_for_value_to_propegate_to_replica $master $replica "key1"
# Confirm the occurrence of a race condition.
set res [wait_for_log_messages -1 {"*RDB channel sync - psync established after rdb load*"} $loglines 2000 1]
set loglines [lindex $res 1]
Expand Down
6 changes: 3 additions & 3 deletions tests/support/test.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ proc verify_replica_online {master replica_idx max_retry} {
}

proc wait_for_value_to_propegate_to_replica {master replica key} {
set val [$master get key]
wait_for_condition 50 1000 {
set val [$master get $key]
wait_for_condition 50 500 {
([$replica get $key] eq $val)
} else {
error "key $key did not propegate"
error "Key $key did not propegate. Expected $val but got [$replica get $key]"
}
}

Expand Down

0 comments on commit 8b4aba0

Please sign in to comment.