Skip to content

Commit

Permalink
fix test Protocol desync regression test with TLS (#1593)
Browse files Browse the repository at this point in the history
remove socket nonblocking and simplify the validation

fixes #1592

Signed-off-by: ranshid <[email protected]>
  • Loading branch information
ranshid authored Jan 21, 2025
1 parent dd92d07 commit 7fc958d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/unit/protocol.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
}
}
Expand Down

0 comments on commit 7fc958d

Please sign in to comment.