Commit 95849c9
committed
Deflake diskless timeout rdb pipe test by tolerating either timeout-disconnect branch
The "diskless timeout replicas drop during rdb pipe" subcase in
tests/integration/replication.tcl waits for a "(full sync)" timeout
disconnect log. On test-macos-latest the disconnect can surface on the
"(streaming sync)" branch instead, because the RDB child exits and
clears server.rdb_child_type (src/rdb.c:3698) in the same serverCron
tick as the disconnect loop (src/replication.c:5348), closing the
(full sync) window before it can fire. The timed-out replica is by then
already promoted via replicaPutOnline(), so it falls into the
(streaming sync) branch (src/replication.c:5357-5364). Linux CI does
not hit this because SIGSTOP back-pressure keeps the RDB child blocked
on the pipe write long enough that backgroundSaveDoneHandler does not
run in the same tick.
Accept either timeout-disconnect message and assert exactly one such
disconnect occurred, so the test still rejects a regression that emits
zero or multiple timeouts. This follows the existing catch+fallback
convention already used in the same test for "all" and "slow"
subcases (replication.tcl:1011-1036).
Also addresses CodeRabbit feedback by adding a descriptive failure
message to the `assert_equal 1 [count_log_message ...]` guard so a
regression that emits zero or multiple timeout-disconnect log lines
surfaces with context instead of a bare `Expected '1' to be equal
to '0'`.
Fixes #3686.
Signed-off-by: Taeknology <20297177+Taeknology@users.noreply.github.com>1 parent 8274099 commit 95849c9
1 file changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
976 | 989 | | |
977 | | - | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
978 | 1000 | | |
979 | 1001 | | |
980 | 1002 | | |
| |||
0 commit comments