Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test for maxclients.

  • Loading branch information...
commit a3af8d8e49c9b65f67403ca53dd5b573fadc55b4 1 parent 69e7958
@antirez authored
Showing with 14 additions and 0 deletions.
  1. +1 −0  tests/test_helper.tcl
  2. +13 −0 tests/unit/limits.tcl
View
1  tests/test_helper.tcl
@@ -38,6 +38,7 @@ set ::all_tests {
unit/scripting
unit/maxmemory
unit/introspection
+ unit/limits
unit/obuf-limits
unit/dump
}
View
13 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*}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.