惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
J
Java Code Geeks
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
雷峰网
雷峰网
D
DataBreaches.Net
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
V
Visual Studio Blog
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test(scripts): harden kitchen sink timeout tests · opencl...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main

@@ -738,7 +738,14 @@ describe("kitchen-sink RPC command output capture", () => {

738738

const root = mkdtempSync(path.join(tmpdir(), "openclaw-kitchen-rpc-timeout-"));

739739

const scriptPath = path.join(root, "trap-term.mjs");

740740

const grandchildPidPath = path.join(root, "grandchild.pid");

741+

const grandchildReadyPath = path.join(root, "grandchild.ready");

741742

let grandchildPid = 0;

743+

const grandchildScript = [

744+

"const fs = require('node:fs');",

745+

"process.on('SIGTERM', () => {});",

746+

"fs.writeFileSync(process.env.GRANDCHILD_READY_PATH, 'ready');",

747+

"setInterval(() => {}, 1000);",

748+

].join(" ");

742749743750

writeFileSync(

744751

scriptPath,

@@ -748,28 +755,37 @@ import fs from "node:fs";

748755749756

const grandchild = spawn(process.execPath, [

750757

"-e",

751-

"process.on('SIGTERM', () => {}); setInterval(() => {}, 1000);",

752-

], { stdio: "ignore" });

758+

${JSON.stringify(grandchildScript)},

759+

], { env: { ...process.env, GRANDCHILD_READY_PATH: process.argv[3] }, stdio: "ignore" });

753760

fs.writeFileSync(process.argv[2], String(grandchild.pid));

754761

process.on("SIGTERM", () => {});

755762

setInterval(() => {}, 1000);

756763

`,

757764

"utf8",

758765

);

759766760-

const runPromise = runCommand(process.execPath, [scriptPath, grandchildPidPath], {

767+

const runPromise = runCommand(process.execPath, [scriptPath, grandchildPidPath, grandchildReadyPath], {

761768

detached: undefined,

762769

timeoutKillGraceMs: 25,

763770

timeoutMs: 500,

764771

});

772+

const runErrorPromise = runPromise.then(

773+

() => {

774+

throw new Error("expected timed command to reject");

775+

},

776+

(error: unknown) => error,

777+

);

765778766779

try {

767780

await waitFor(() => existsSync(grandchildPidPath));

781+

await waitFor(() => existsSync(grandchildReadyPath));

768782

grandchildPid = Number.parseInt(readText(grandchildPidPath), 10);

769783

expect(Number.isInteger(grandchildPid)).toBe(true);

770784

expect(isProcessAlive(grandchildPid)).toBe(true);

771785772-

await expect(runPromise).rejects.toThrow("timed out after 500ms");

786+

const runError = await runErrorPromise;

787+

expect(runError).toBeInstanceOf(Error);

788+

expect((runError as Error).message).toContain("timed out after 500ms");

773789

await waitFor(() => !isProcessAlive(grandchildPid), 5_000);

774790

} finally {

775791

await runPromise.catch(() => {});

@@ -1015,7 +1031,14 @@ describe("kitchen-sink RPC caller loading", () => {

10151031

const root = makeTempDir(tempDirs, "openclaw-kitchen-rpc-timeout-clean-parent-");

10161032

const scriptPath = path.join(root, "term-zero-grandchild.mjs");

10171033

const grandchildPidPath = path.join(root, "grandchild.pid");

1034+

const grandchildReadyPath = path.join(root, "grandchild.ready");

10181035

let grandchildPid = 0;

1036+

const grandchildScript = [

1037+

"const fs = require('node:fs');",

1038+

"process.on('SIGTERM', () => {});",

1039+

"fs.writeFileSync(process.env.GRANDCHILD_READY_PATH, 'ready');",

1040+

"setInterval(() => {}, 1000);",

1041+

].join(" ");

1019104210201043

writeFileSync(

10211044

scriptPath,

@@ -1025,27 +1048,36 @@ import fs from "node:fs";

1025104810261049

const grandchild = spawn(process.execPath, [

10271050

"-e",

1028-

"process.on('SIGTERM', () => {}); setInterval(() => {}, 1000);",

1029-

], { stdio: "ignore" });

1051+

${JSON.stringify(grandchildScript)},

1052+

], { env: { ...process.env, GRANDCHILD_READY_PATH: process.argv[3] }, stdio: "ignore" });

10301053

fs.writeFileSync(process.argv[2], String(grandchild.pid));

10311054

process.on("SIGTERM", () => process.exit(0));

10321055

setInterval(() => {}, 1000);

10331056

`,

10341057

"utf8",

10351058

);

103610591037-

const runPromise = runCommand(process.execPath, [scriptPath, grandchildPidPath], {

1060+

const runPromise = runCommand(process.execPath, [scriptPath, grandchildPidPath, grandchildReadyPath], {

10381061

timeoutKillGraceMs: 2_000,

1039-

timeoutMs: 100,

1062+

timeoutMs: 1_500,

10401063

});

1064+

const runErrorPromise = runPromise.then(

1065+

() => {

1066+

throw new Error("expected timed command to reject");

1067+

},

1068+

(error: unknown) => error,

1069+

);

1041107010421071

try {

10431072

await waitFor(() => existsSync(grandchildPidPath));

1073+

await waitFor(() => existsSync(grandchildReadyPath));

10441074

grandchildPid = Number.parseInt(readText(grandchildPidPath), 10);

10451075

expect(Number.isInteger(grandchildPid)).toBe(true);

10461076

expect(isProcessAlive(grandchildPid)).toBe(true);

104710771048-

await expect(runPromise).rejects.toThrow("timed out after 100ms");

1078+

const runError = await runErrorPromise;

1079+

expect(runError).toBeInstanceOf(Error);

1080+

expect((runError as Error).message).toContain("timed out after 1500ms");

10491081

await waitFor(() => !isProcessAlive(grandchildPid), 5_000);

10501082

} finally {

10511083

await runPromise.catch(() => {});