Skip to content

Commit

Permalink
Test for maxclients.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Apr 8, 2012
1 parent 69e7958 commit a3af8d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_helper.tcl
Expand Up @@ -38,6 +38,7 @@ set ::all_tests {
unit/scripting
unit/maxmemory
unit/introspection
unit/limits
unit/obuf-limits
unit/dump
}
Expand Down
13 changes: 13 additions & 0 deletions 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*}
}

0 comments on commit a3af8d8

Please sign in to comment.