diff options
author | yoav-steinberg <yoav@monfort.co.il> | 2021-10-05 18:00:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 18:00:19 +0300 |
commit | 897c7bddf5dcdc2fd6b4071ecfb15a88a6afaa04 (patch) | |
tree | f56c4a2dbf269bfa06b42700dd145f9cd4ad1e56 /tests | |
parent | 83478e6102bd86d077e64bb40b0903f8a06905b1 (diff) | |
download | redis-897c7bddf5dcdc2fd6b4071ecfb15a88a6afaa04.tar.gz |
Attempt to fix rare pubsub oubuf maxmemory eviction test failure (#9603)
* Reduce delay between publishes to allow less time to write the obufs.
* More subscribed clients to buffer more data per publish.
* Make sure main connection isn't evicted (it has a large qbuf).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/maxmemory.tcl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/maxmemory.tcl b/tests/unit/maxmemory.tcl index b886c1e53..e119e7296 100644 --- a/tests/unit/maxmemory.tcl +++ b/tests/unit/maxmemory.tcl @@ -9,6 +9,7 @@ start_server {tags {"maxmemory" "external:skip"}} { set prev_maxmemory_clients [r config get maxmemory-clients] if $client_eviction { r config set maxmemory-clients 3mb + r client no-evict on } else { r config set maxmemory-clients 0 } @@ -116,7 +117,7 @@ start_server {tags {"maxmemory" "external:skip"}} { test "eviction due to output buffers of pubsub, client eviction: $client_eviction" { init_test $client_eviction - for {set j 0} {$j < 10} {incr j} { + for {set j 0} {$j < 20} {incr j} { set rr [redis_client] lappend clients $rr } @@ -125,8 +126,9 @@ start_server {tags {"maxmemory" "external:skip"}} { $rr subscribe bla } + set bigstr [string repeat x 100000] for {set j 0} {$j < 40} {incr j} { - if {[catch {r publish bla [string repeat x 100000]} err]} { + if {[catch {r publish bla $bigstr} err]} { if $::verbose { puts "Error publishing: $err" } |