Fix timing issue for correct replication disconnection time counters behavior test (#14221)

Co-authored-by: debing.sun <debing.sun@redis.com>
This commit is contained in:
Stav-Levi 2025-08-06 10:07:30 +03:00 committed by GitHub
parent 0ac04bbd14
commit 7b40dbacdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1726,10 +1726,9 @@ start_server {tags {"repl external:skip"}} {
assert {$link_down_since > 0}
assert {$total_disconnect_time > $link_down_since}
# total_disconnect_time did not change after reconnect to real master
# total_disconnect_time_reconnect can be up to 5 seconds more than total_disconnect_time due to reconnection time
set total_disconnect_time_reconnect [status $slave total_disconnect_time_sec]
assert {$total_disconnect_time == $total_disconnect_time_reconnect}
assert {$total_disconnect_time_reconnect >= $total_disconnect_time && $total_disconnect_time_reconnect <= $total_disconnect_time + 5}
}
}
}