This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Repository navigation
tests: start every server test on a free port - #466
Merged
Merged
Conversation
Server tests that used the default or a fixed port failed when anything else held 2480. A free_port() helper in conftest picks one per test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
|
Ran the four server test files with port 2480 held by a dummy listener for the whole run: ============================= 21 passed in 16.33s ==============================. Before this change, tests on the fixed port failed with "Unable to listen to a HTTP port in the configured port range 2480 - 2480" whenever 2480 was taken. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #464
Every test that starts a server on the default or a fixed port now passes
config={"http_port": free_port()}, with onefree_port()helper in tests/conftest.py (the wire-protocol tests keep their own_free_ports, which hands out several distinct ports at once). Touches test_server_patterns.py (all six servers, including test_embedded_performance_comparison and test_http_api_access_pattern), test_server.py (the fixed 2480 and 8080 become free ports and the asserts compare against the chosen port), test_server_packaging.py and test_server_http_endpoints.py.Draft until the run below is in: the four files are queued behind other jobs in quiet_build.sh, once with a dummy listener holding 0.0.0.0:2480 to prove the fix. Results will be added here.
🤖 Generated with Claude Code