Skip to content

Claude-contributed (and -fixed) tests for Socket client/server - #76

Merged
garethpotter merged 1 commit into
mainfrom
claude-adds-some-more-socket-server-tests
Nov 6, 2026
Merged

garethpotter merged 1 commit into
mainfrom
claude-adds-some-more-socket-server-tests

Conversation

@garethpotter

Copy link
Copy Markdown
Collaborator

I got Claude to add some tests. It also contributed a fix for the one you just added:

this test failed 7 times in 30 on unmodified main. The 100 ms wait meant to follow a client's disconnect ran before the client was closed, so the next round connected immediately. The server then sometimes refused it because the previous client's slot hadn't been freed yet. Debug logging confirmed this. Moving the client into its own scope so the wait comes after the close fixed it; the server code is fine.

@amitchone amitchone left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A great catch on the intermittently failing test, it failed 14/30 for me just now

@garethpotter
garethpotter merged commit d90d19b into main Nov 6, 2026
6 checks passed
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