mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
22 lines
675 B
Tcl
22 lines
675 B
Tcl
start_server {tags {"obuf-limits"}} {
|
|
test {Test that client output buffer hard limit is enforced} {
|
|
r config set client-output-buffer-limit {pubsub 100000 0 0}
|
|
set rd1 [redis_deferring_client]
|
|
|
|
$rd1 subscribe foo
|
|
set reply [$rd1 read]
|
|
assert {$reply eq "subscribe foo 1"}
|
|
|
|
set omem 0
|
|
while 1 {
|
|
r publish foo bar
|
|
set clients [split [r client list] "\r\n"]
|
|
set c [split [lindex $clients 1] " "]
|
|
if {![regexp {omem=([0-9]+)} $c - omem]} break
|
|
if {$omem > 200000} break
|
|
}
|
|
assert {$omem >= 100000 && $omem < 200000}
|
|
$rd1 close
|
|
}
|
|
}
|