test: stabilize windows pty expectations
This commit is contained in:
@@ -10,7 +10,7 @@ afterEach(() => {
|
|||||||
test("exec supports pty output", async () => {
|
test("exec supports pty output", async () => {
|
||||||
const tool = createExecTool({ allowBackground: false });
|
const tool = createExecTool({ allowBackground: false });
|
||||||
const result = await tool.execute("toolcall", {
|
const result = await tool.execute("toolcall", {
|
||||||
command: "node -e 'process.stdout.write(\"ok\")'",
|
command: "node -e \"process.stdout.write('ok')\"",
|
||||||
pty: true,
|
pty: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ test("process submit sends Enter for pty sessions", async () => {
|
|||||||
sessionId,
|
sessionId,
|
||||||
});
|
});
|
||||||
|
|
||||||
for (let i = 0; i < 10; i += 1) {
|
const deadline = Date.now() + (process.platform === "win32" ? 4000 : 2000);
|
||||||
|
while (Date.now() < deadline) {
|
||||||
await wait(50);
|
await wait(50);
|
||||||
const poll = await processTool.execute("toolcall", { action: "poll", sessionId });
|
const poll = await processTool.execute("toolcall", { action: "poll", sessionId });
|
||||||
const details = poll.details as { status?: string; aggregated?: string };
|
const details = poll.details as { status?: string; aggregated?: string };
|
||||||
|
|||||||
Reference in New Issue
Block a user