Skip to content

test(ws): handle messages gracefully - #812

Merged
Berrysoft merged 1 commit into
compio-rs:masterfrom
Berrysoft:fix/ws-test-leak
Mar 29, 2026
Merged

Berrysoft merged 1 commit into
compio-rs:masterfrom
Berrysoft:fix/ws-test-leak

Conversation

@Berrysoft

Copy link
Copy Markdown
Member

Detected by the sanitizer.

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.

Pull request overview

Updates the WebSocket test suite to avoid relying on explicit control-frame replies in test tasks and to validate the close handshake more explicitly, aligning behavior with tungstenite’s internal control-frame handling.

Changes:

  • Simplify ping/pong server-side test logic by asserting receipt of Ping rather than manually sending Pong.
  • Extend the close-handshake test to read and assert a close message after initiating close() on the client side.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@George-Miao George-Miao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Berrysoft
Berrysoft added this pull request to the merge queue Mar 29, 2026
Merged via the queue into compio-rs:master with commit 8fe4b7f Mar 29, 2026
71 checks passed
@Berrysoft
Berrysoft deleted the fix/ws-test-leak branch March 29, 2026 17:30
@github-actions github-actions Bot mentioned this pull request Mar 28, 2026
This was referenced Apr 21, 2026
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.

3 participants