@@ -25,9 +25,19 @@ proc test_psync {descr duration backlog_size backlog_ttl delay cond mdl sdl bgsa
2525 $master config set swap-debug-swapout-notify-delay-micro 10000
2626 $slave config set repl-diskless-load $sdl
2727
28- set load_handle0 [start_bg_complex_data $master_host $master_port 0 100000]
29- set load_handle1 [start_bg_complex_data $master_host $master_port 0 100000]
30- set load_handle2 [start_bg_complex_data $master_host $master_port 0 100000]
28+ # Diskless swapdb/disabled loads are much slower under ASAN.
29+ # Raise repl-timeout so a slow full sync doesn't livelock.
30+ if {$::swap && $::asan } {
31+ $master config set repl-timeout 600
32+ $slave config set repl-timeout 600
33+ }
34+
35+ # Keep the dataset large enough to overflow tiny backlogs, but small
36+ # enough that swap+asan full resyncs can finish within the timeout.
37+ set bg_limit [expr {$::asan ? 5000 : 100000}]
38+ set load_handle0 [start_bg_complex_data $master_host $master_port 0 $bg_limit ]
39+ set load_handle1 [start_bg_complex_data $master_host $master_port 0 $bg_limit ]
40+ set load_handle2 [start_bg_complex_data $master_host $master_port 0 $bg_limit ]
3141 test {Slave should be able to synchronize with the master} {
3242 $slave slaveof $master_host $master_port
3343 wait_for_condition 50 1000 {
@@ -75,7 +85,8 @@ proc test_psync {descr duration backlog_size backlog_ttl delay cond mdl sdl bgsa
7585
7686 # Wait for the slave to reach the "online"
7787 # state from the POV of the master.
78- wait_slave_online $master 5000 100 {
88+ set maxwait [expr {($::swap && $::asan ) ? 6000 : 5000}]
89+ wait_slave_online $master $maxwait 100 {
7990 error " assertion:Slave not correctly synchronized"
8091 }
8192
0 commit comments