diff --git a/tests/unit/obuf-limits.tcl b/tests/unit/obuf-limits.tcl index 456d3ac82..38a643385 100644 --- a/tests/unit/obuf-limits.tcl +++ b/tests/unit/obuf-limits.tcl @@ -31,7 +31,11 @@ start_server {tags {"obuf-limits"}} { set start_time 0 set time_elapsed 0 while 1 { - r publish foo bar + if {$start_time != 0} { + # Slow down loop when omen has reached the limit. + after 10 + } + r publish foo [string repeat "x" 1000] set clients [split [r client list] "\r\n"] set c [split [lindex $clients 1] " "] if {![regexp {omem=([0-9]+)} $c - omem]} break @@ -57,7 +61,11 @@ start_server {tags {"obuf-limits"}} { set start_time 0 set time_elapsed 0 while 1 { - r publish foo bar + if {$start_time != 0} { + # Slow down loop when omen has reached the limit. + after 10 + } + r publish foo [string repeat "x" 1000] set clients [split [r client list] "\r\n"] set c [split [lindex $clients 1] " "] if {![regexp {omem=([0-9]+)} $c - omem]} break