valkey/tests/unit/limits.tcl

22 lines
558 B
Tcl
Raw Normal View History

start_server {tags {"limits network"} overrides {maxclients 10}} {
if {$::tls} {
set expected_code "*I/O error*"
} else {
set expected_code "*ERR max*reached*"
}
2012-04-08 09:16:40 +00:00
test {Check if maxclients works refusing connections} {
set c 0
catch {
while {$c < 50} {
2012-04-08 09:16:40 +00:00
incr c
2012-04-18 09:34:18 +00:00
set rd [redis_deferring_client]
$rd ping
$rd read
after 100
2012-04-08 09:16:40 +00:00
}
} e
assert {$c > 8 && $c <= 10}
set e
} $expected_code
2012-04-08 09:16:40 +00:00
}