From 897c7bddf5dcdc2fd6b4071ecfb15a88a6afaa04 Mon Sep 17 00:00:00 2001 From: yoav-steinberg Date: Tue, 5 Oct 2021 18:00:19 +0300 Subject: 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). --- tests/unit/maxmemory.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') 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" } -- cgit v1.2.1