Skip to content

pytestadapter: Read pipe in non-blocking mode so tests don't hang if the subprocess fails to open the pipe for writing.#25725

Open
garyvdm wants to merge 3 commits intomicrosoft:mainfrom
garyvdm:test_non_block_io
Open

pytestadapter: Read pipe in non-blocking mode so tests don't hang if the subprocess fails to open the pipe for writing.#25725
garyvdm wants to merge 3 commits intomicrosoft:mainfrom
garyvdm:test_non_block_io

Conversation

@garyvdm
Copy link

@garyvdm garyvdm commented Jan 10, 2026

When running the pytest adapter tests, if subprocess fails to open the pipe for writing, then the the open call for reading the pipe blocks, and the tests hang. This PR fixes that by using non-blocking IO when reading the pipe. This should make debugging the tests easier.

This also address 2 other minor issues:

  • Remove unused code for listening on a unix socket.
  • Refactor test runner to make platform specific named pipe code encapsulated.

@garyvdm
Copy link
Author

garyvdm commented Jan 10, 2026

@microsoft-github-policy-service agree

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.

1 participant