You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Close reserved sockets before testing connection failures - #910
Follow-up to #907, addressing @kraenhansen’s [request](https://github.com/elevenlabs/elevenlabs-python/pull/907#issuecomment-6436661396).
Close the temporary sockets after reading their ports, before attempting the connections. Keeping them bound but non-listening can cause the connection-failure tests to time out on macOS instead of receiving a refused connection.
This is a two-line, test-only change. SDK behavior and existing assertions are unchanged.
### Validation- All 108 related tests pass on Python 3.8 and 3.13 on Windows.
- Ruff lint and whitespace checks pass.
- Native macOS verification is still needed.
- An existing formatting issue elsewhere in the test file is left unchanged.
Low Risk
Test-only change with no production code or assertion updates.
Overview Test fix for connection-failure scenarios on macOS — follow-up to #907.
In test_sync_connection_failure_reports_error and test_async_connection_failure_reports_error, the tests reserve an ephemeral port by binding a temporary socket, then close that socket before Conversation / AsyncConversation tries to connect. Previously the port stayed bound but nothing listened, which on macOS could make these tests hang until timeout instead of failing fast with a refused connection.
Assertions and SDK behavior are unchanged; this is a two-line, test-only reliability fix.
Reviewed by Cursor Bugbot for commit 43150a7. Bugbot is set up for automated code reviews on this repo. Configure here.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.