Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Conversation

@zamderax
Copy link
Member

@zamderax zamderax commented Jul 29, 2025

Summary

  • Fixed flaky test_close_delivers_pending_messages that was failing with "Unexpected event: Some(Received {...})"
  • The test creates an echo server but wasn't expecting to receive echoed messages back
  • Now properly handles Received events while still verifying all messages are sent before closing

Test plan

  • Test now passes consistently on Windows without default features
  • Verified the test still validates that all 5 messages are sent before connection closes
  • The fix allows for receiving 0-5 echoed messages, handling the race condition gracefully

The test_close_delivers_pending_messages test was failing intermittently
because it used an echo server but didn't expect to receive the echoed
messages back. This caused the test to panic when it received Received
events that it wasn't expecting.

The fix allows the test to handle Received events from the echo server
while still verifying that all Sent events are delivered before the
connection closes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@zamderax zamderax merged commit 9a71e90 into main Jul 29, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants