mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
50ee0f5be8
Based on feedback from interested parties
28 lines
787 B
Tcl
28 lines
787 B
Tcl
# SPDX-FileCopyrightText: 2024 Redict Contributors
|
|
# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo <antirez at gmail dot com>
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
# SPDX-License-Identifier: LGPL-3.0-only
|
|
|
|
start_server {tags {"limits network external:skip"} 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 [redict_deferring_client]
|
|
$rd ping
|
|
$rd read
|
|
after 100
|
|
}
|
|
} e
|
|
assert {$c > 8 && $c <= 10}
|
|
set e
|
|
} $expected_code
|
|
}
|