From a36cfc082999d38275d3167da806dfc1e45d00f2 Mon Sep 17 00:00:00 2001 From: Vitah Lin Date: Fri, 29 May 2026 09:57:59 +0800 Subject: [PATCH] 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. --- tests/unit/cluster/slot-stats.tcl | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/cluster/slot-stats.tcl b/tests/unit/cluster/slot-stats.tcl index 2724ed519..9860dfb53 100644 --- a/tests/unit/cluster/slot-stats.tcl +++ b/tests/unit/cluster/slot-stats.tcl @@ -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 [