fix(process): retain provider output until streams close (#928)
This commit is contained in:
@@ -220,3 +220,24 @@ describe("Linux private display selection", () => {
|
||||
expect(processes).not.toContain(hangingHelperPath);
|
||||
});
|
||||
});
|
||||
|
||||
describe("private display probe output settlement", () => {
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"retains inherited diagnostics written after the launcher exits",
|
||||
async () => {
|
||||
const result = await runLinuxPrivateDisplayProbe("direct", {
|
||||
helperPath: fileURLToPath(
|
||||
new URL("../../../fixtures/x11ProbeOutput.py", import.meta.url),
|
||||
),
|
||||
timeoutMs: 5_000,
|
||||
});
|
||||
expect(result).toEqual({
|
||||
outcome: "exited",
|
||||
exitCode: 0,
|
||||
stderr: "firstlast",
|
||||
stderrBytes: Buffer.byteLength("firstlast"),
|
||||
cleanupIncomplete: false,
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
sys.stderr.write("first")
|
||||
sys.stderr.flush()
|
||||
subprocess.Popen(
|
||||
[sys.executable, "-c", "import sys, time; time.sleep(0.05); sys.stderr.write('last'); sys.stderr.flush()"],
|
||||
stdout=subprocess.DEVNULL,
|
||||
)
|
||||
Reference in New Issue
Block a user