Skip to content

Make UNIX endpoint connection test deterministic - #32

Merged
ioquatix merged 1 commit into
mainfrom
improve-unix-endpoint-connect-test
Aug 19, 2026
Merged

ioquatix merged 1 commit into
mainfrom
improve-unix-endpoint-connect-test

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

The UNIX endpoint connection test used Thread#status as a readiness signal after making a separate bound? probe connection. This allowed the actual connection attempt to race with the accept loop and intermittently fail with ECONNREFUSED on macOS.

Test exactly one accepted connection instead, propagate exceptions from the server thread, and cover bound? independently. Endpoint#bind already starts listening, so the additional listen(1) call is unnecessary.

Verification:

  • 100 consecutive focused runs with Ruby 4.0
  • Full test suite: 101 tests, 186 assertions
  • RuboCop on the changed test file

Assisted-By: devx/3ed43c18-3c9a-4ad9-a6f5-6668caa29658
@ioquatix
ioquatix merged commit 1080f17 into main Aug 19, 2026
35 of 43 checks passed
@ioquatix
ioquatix deleted the improve-unix-endpoint-connect-test branch August 19, 2026 03:15
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