From 68a38cf80347787d2fe0e3cf06fdef83ebe784b6 Mon Sep 17 00:00:00 2001 From: ranshid Date: Tue, 21 Jan 2025 05:01:23 +0000 Subject: [PATCH] fix test Protocol desync regression test with TLS remove socket nonblocking and simplify the validation Signed-off-by: ranshid --- tests/unit/protocol.tcl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/unit/protocol.tcl b/tests/unit/protocol.tcl index 7153173e0d..5baba99f8b 100644 --- a/tests/unit/protocol.tcl +++ b/tests/unit/protocol.tcl @@ -77,7 +77,6 @@ start_server {tags {"protocol network"}} { } else { set s [socket [srv 0 host] [srv 0 port]] } - fconfigure $s -blocking 0 puts -nonewline $s $seq # PROTO_INLINE_MAX_SIZE is hardcoded in Valkey code to 64K. doing the same here # since we would like to validate it is enforced. @@ -94,12 +93,7 @@ start_server {tags {"protocol network"}} { break } } - - wait_for_condition 50 100 { - [string match {*Protocol error*} [gets $s]] - } else { - fail "expected connection to be closed on protocol error after sending $payload_size bytes" - } + assert_match {*Protocol error*} [gets $s]] close $s } }