| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Drain nonblocking FIFO readers to EOF and explicitly dispose result pipes after the fallback timeout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the disposable result pipe handle returned by the updated test utility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
This PR fixes a POSIX FIFO EOF detection gap in the test result named-pipe reader that caused test runs to regularly wait for the 5s RESULT_PIPE_DRAIN_TIMEOUT_MS fallback after the Python subprocess exited. It replaces the FIFO net.Socket reader with a direct FD reader that can reliably settle onClose on writer disconnect, and updates adapters to explicitly dispose result-pipe resources after the drain/timeout window.
Changes:
| File | Description |
|---|---|
| src/client/common/pipes/namedPipes.ts | Adds a POSIX FIFO FD-based message reader and wires it into createReaderPipe(). |
| src/client/testing/testController/common/utils.ts | Changes startRunResultNamedPipe() to return an owned handle with a dispose() method. |
| src/client/testing/testController/pytest/pytestExecutionAdapter.ts | Uses resultPipe.name and disposes the result pipe after drain/timeout. |
| src/client/testing/testController/unittest/testExecutionAdapter.ts | Uses resultPipe.name and disposes the result pipe after drain/timeout. |
| src/test/common/pipes/namedPipes.unit.test.ts | Adds POSIX FIFO tests for buffered payloads, empty writer, and cancellation close. |
| src/test/testing/testController/pytest/pytestExecutionAdapter.unit.test.ts | Updates stubs to match the new { name, dispose } result-pipe return type. |
| src/test/testing/testController/unittest/testExecutionAdapter.unit.test.ts | Updates stubs to match the new { name, dispose } result-pipe return type. |
| src/test/testing/testController/testCancellationRunAdapters.unit.test.ts | Asserts the adapter disposes the result-pipe handle during cancellation flows. |
Sorry, something went wrong.
| if (bytesRead > 0) { | ||
| this.hasReadData = true; | ||
| this.stream.write(Buffer.from(this.buffer.subarray(0, bytesRead))); | ||
| continue; | ||
| } |
| Back | FazBrowse Home | New Git URL |
Summary
Why
A net.Socket created from a nonblocking FIFO descriptor receives data but does not emit end or close when the FIFO writer exits. After the cancellation drainage change, test execution therefore waited for the five-second fallback on every affected run.
The new reader drains the descriptor directly and settles onClose after EOF, avoiding the delay without reintroducing dropped buffered results.
Fixes #26071