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:
Vitah Lin 2026-05-26 08:57:13 +08:00 committed by GitHub
parent 13d9553673
commit fa08257fcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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