limits.tcl 572 B

123456789101112131415161718192021
  1. start_server {tags {"limits network external:skip"} overrides {maxclients 10}} {
  2. if {$::tls} {
  3. set expected_code "*I/O error*"
  4. } else {
  5. set expected_code "*ERR max*reached*"
  6. }
  7. test {Check if maxclients works refusing connections} {
  8. set c 0
  9. catch {
  10. while {$c < 50} {
  11. incr c
  12. set rd [redis_deferring_client]
  13. $rd ping
  14. $rd read
  15. after 100
  16. }
  17. } e
  18. assert {$c > 8 && $c <= 10}
  19. set e
  20. } $expected_code
  21. }