mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Fix flaky redis-cli reverse search no-result test (#15119)
## Problem The `redis-cli` reverse-search test for the no-result case can be flaky in slower CI environments. `read_cli` may return too early when CLI output is fragmented or delayed. It currently gives up after only 5 consecutive empty reads, with a 10ms delay between reads, which can make the test assert before the expected `(empty array)` output is printed. ## Changes Increase the `read_cli` consecutive empty-read threshold from `5` to `100`. This keeps the existing read behavior unchanged when data is available, but allows the helper to wait longer for delayed/fragmented CLI output before giving up. --------- Co-authored-by: debing.sun <debing.sun@redis.com>
This commit is contained in:
parent
13d9553673
commit
fa08257fcb
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ start_server {tags {"cli"}} {
|
|||
|
||||
# We may have a short read, try to read some more.
|
||||
set empty_reads 0
|
||||
while {$empty_reads < 5} {
|
||||
while {$empty_reads < 100} {
|
||||
set buf [read $fd]
|
||||
if {[string length $buf] == 0} {
|
||||
after 10
|
||||
|
|
|
|||
Loading…
Reference in a new issue