Uh oh!
There was an error while loading. Please reload this page.
Isolate tests from external GraphServers - #263
Open
KonradPilch wants to merge 2 commits into
Open
Conversation
Start a fresh GraphServer on an OS-assigned loopback port for every test, then point in-process defaults and child environments at it. This prevents tests from attaching to unrelated servers while preserving explicit address overrides. Keep implicit auto-start coverage with a dedicated isolated test and re-enable test_attach for multiprocess attachment.
Wait for both child processes with a bounded timeout and assert successful exit codes. Ensure failed or hung children are terminated and make the test module importable to Windows spawn workers.
6 tasks
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fix for issue #261 : Test suite silently attaches to any GraphServer already on the default port
Solution
test_attachwith timeouts, exit-code checks, and process cleanup.Note
While hardening
test_attach, its new exit-code checks exposed a Windows spawn issue: child processes could not import the test module under pytest’s importlib mode. The second commit also fixes that import path issue.Testing