redict/tests/unit/limits.tcl
Yossi Gottlieb 522d93607a
Add io-thread daily CI tests. (#8232)
This adds basic coverage to IO threads by running the cluster and few selected Redis test suite tests with the IO threads enabled.

Also provides some necessary additional improvements to the test suite:

* Add --config to sentinel/cluster tests for arbitrary configuration.
* Fix --tags whitelisting which was broken.
* Add a `network` tag to some tests that are more network intensive. This is work in progress and more tests should be properly tagged in the future.
2021-01-17 15:48:48 +02:00

22 lines
558 B
Tcl

start_server {tags {"limits network"} 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
}