diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index 2ec3aad1c..598a39291 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -38,6 +38,7 @@ set ::all_tests { unit/scripting unit/maxmemory unit/introspection + unit/limits unit/obuf-limits unit/dump } diff --git a/tests/unit/limits.tcl b/tests/unit/limits.tcl new file mode 100644 index 000000000..9988983fa --- /dev/null +++ b/tests/unit/limits.tcl @@ -0,0 +1,13 @@ +start_server {tags {"limits"} overrides {maxclients 10}} { + test {Check if maxclients works refusing connections} { + set c 0 + catch { + while 1 { + incr c + redis_deferring_client + } + } e + assert {$c > 8 && $c <= 10} + set e + } {*ERR max*reached*} +}