Skip to content

test(mqtt): accept a reset TLS peer in the relay teardown test - #308

Merged
Lash-L merged 1 commit into
mainfrom
fix/flaky-relay-teardown-test
Nov 29, 2026
Merged

Lash-L merged 1 commit into
mainfrom
fix/flaky-relay-teardown-test

Conversation

@Lash-L

@Lash-L Lash-L commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

The TLS variant of test_close_conn_endpoints_wakes_relay_threads_blocked_in_recv, added in #263, is flaky on Linux. It failed the v1.3.0-rc1 release build on several attempts and #263's PR run, but passed on main's push run for the same commit.

Only the last assertion fails: the robot side's recv(1) == b"". By then the relay threads have already exited cleanly with no errors, which is what the test is for. The proxy shuts the socket down without a TLS close_notify, so the robot's read can return EOF, raise SSLEOFError, or raise BrokenPipeError / ConnectionResetError when its TLS layer writes during the read.

This adds _assert_peer_closed(), which accepts those exceptions for TLS sockets only. Plain sockets must still read a clean EOF. There are no server code changes.

🤖 Generated with Claude Code

The TLS variant of the relay teardown test expected the robot side to read a
clean EOF. The proxy shuts the socket down without a TLS close_notify, so on
Linux the robot's read can raise BrokenPipeError or SSLEOFError instead. This
failed the v1.3.0-rc1 release build. Accept those for TLS sockets only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 29, 2026 04:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Lash-L
Lash-L merged commit bfc5508 into main Nov 29, 2026
3 checks passed
@Lash-L
Lash-L deleted the fix/flaky-relay-teardown-test branch November 29, 2026 04:22
Lash-L added a commit that referenced this pull request Nov 29, 2026
Bump the package to 1.3.0-rc2 and point the opt-in Beta add-on at it.
The v1.3.0-rc1 release build failed on a flaky test (fixed in #308), so
no rc1 image was published; rc2 replaces it and adds #312, #313 and
#314. The stable add-on stays on 1.2.1.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants