Fix flaky slot-stats inline network-bytes-in test (#15279)

### Issue

CLUSTER SLOT-STATS network-bytes-in, in-line buffer processing can fail
because the test sends an inline SET through a deferring client and
immediately checks slot stats from another client.

$rd flush only guarantees the request was written to the socket; it does
not guarantee Redis has processed the command and updated
network-bytes-in.

### Change

Wait for the inline SET reply before reading CLUSTER SLOT-STATS.
This commit is contained in:
Vitah Lin 2026-05-29 09:57:59 +08:00 committed by GitHub
parent 30f57f32bd
commit a36cfc0829
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -388,6 +388,7 @@ start_cluster 1 0 {tags {external:skip cluster}} {
# SET key value\r\n --> 15 bytes.
$rd write "SET $key value\r\n"
$rd flush
assert_equal OK [$rd read]
set slot_stats [R 0 CLUSTER SLOT-STATS SLOTSRANGE 0 16383]
set expected_slot_stats [