Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Sep 5, 2025

No description provided.

I believe this was getting triggered from multiple threads:
* from `FakeServer#shutdown` (which already has a mutex of its own)
  * called in ensure clause in `FakeServer#run` (from the server thread)
  * called directly by the tests (from the main thread)
* from the ensure clause in `Connection#run` (runs in the server thread)

So the main thread could call `FakeServer#shutdown` while the server
thread is handling the ensure clause in `Connection#run`.  Adding a
mutex to `Connection#close` should fix the flaky tests.
@nevans nevans force-pushed the fix-flaky-fake_server-connection-close branch from 4c06a5f to 2c49cfa Compare September 5, 2025 14:38
@nevans nevans merged commit 5de57d9 into master Sep 5, 2025
37 checks passed
@nevans nevans deleted the fix-flaky-fake_server-connection-close branch September 5, 2025 14:40
@nevans nevans added the documentation Improvements or additions to documentation label Sep 5, 2025
@nevans nevans added tests-only and removed documentation Improvements or additions to documentation labels Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants