redict/tests/unit/limits.tcl
Yossi Gottlieb b087dd1db6 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00

22 lines
550 B
Tcl

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