2021-06-09 12:13:24 +00:00
|
|
|
start_server {tags {"limits network external:skip"} overrides {maxclients 10}} {
|
2019-09-12 07:56:54 +00:00
|
|
|
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 {
|
2012-04-17 08:04:42 +00:00
|
|
|
while {$c < 50} {
|
2012-04-08 09:16:40 +00:00
|
|
|
incr c
|
2024-04-09 14:38:09 +00:00
|
|
|
set rd [valkey_deferring_client]
|
2012-04-18 09:34:18 +00:00
|
|
|
$rd ping
|
|
|
|
$rd read
|
2012-04-17 08:04:42 +00:00
|
|
|
after 100
|
2012-04-08 09:16:40 +00:00
|
|
|
}
|
|
|
|
} e
|
|
|
|
assert {$c > 8 && $c <= 10}
|
|
|
|
set e
|
2019-09-12 07:56:54 +00:00
|
|
|
} $expected_code
|
2012-04-08 09:16:40 +00:00
|
|
|
}
|