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

推荐订阅源

V
V2EX
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
博客园 - 【当耐特】
月光博客
月光博客
C
Check Point Blog
T
The Blog of Author Tim Ferriss
罗磊的独立博客
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
美团技术团队
N
Netflix TechBlog - Medium
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
L
LangChain Blog
The Cloudflare Blog

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: clarify stale pid cleanup assertions · openclaw/ope...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -672,8 +672,8 @@ describe.skipIf(isWindows)("restart-stale-pids", () => {

672672

mockSpawnSync.mockImplementation(() => ({ error: null, status: 1, stdout: "", stderr: "" }));

673673674674

vi.spyOn(process, "kill").mockReturnValue(true);

675-

// Must not throw — the catch path returns transient inconclusive, loop continues

676-

expect(() => cleanStaleGatewayProcessesSync()).not.toThrow();

675+

// The catch path returns transient inconclusive, then the loop continues.

676+

expect(cleanStaleGatewayProcessesSync()).toContain(stalePid);

677677

});

678678

});

679679

@@ -777,7 +777,7 @@ describe.skipIf(isWindows)("restart-stale-pids", () => {

777777

});

778778779779

vi.spyOn(process, "kill").mockReturnValue(true);

780-

expect(() => cleanStaleGatewayProcessesSync()).not.toThrow();

780+

expect(cleanStaleGatewayProcessesSync()).toContain(stalePid);

781781782782

// Must bail after first ENOENT poll — no point retrying a missing binary

783783

const enoentPolls = events.filter((e) => e.startsWith("enoent-poll"));

@@ -792,7 +792,7 @@ describe.skipIf(isWindows)("restart-stale-pids", () => {

792792

createErrnoResult("EPERM", "lsof eperm"),

793793

);

794794

vi.spyOn(process, "kill").mockReturnValue(true);

795-

expect(() => cleanStaleGatewayProcessesSync()).not.toThrow();

795+

expect(cleanStaleGatewayProcessesSync()).toContain(stalePid);

796796

// Must bail after exactly 1 EPERM poll — same as ENOENT/EACCES

797797

expect(getCallCount()).toBe(2); // 1 initial find + 1 EPERM poll

798798

});

@@ -805,7 +805,7 @@ describe.skipIf(isWindows)("restart-stale-pids", () => {

805805

createErrnoResult("EACCES", "lsof permission denied"),

806806

);

807807

vi.spyOn(process, "kill").mockReturnValue(true);

808-

expect(() => cleanStaleGatewayProcessesSync()).not.toThrow();

808+

expect(cleanStaleGatewayProcessesSync()).toContain(stalePid);

809809

// Should have bailed after exactly 1 poll call (the EACCES one)

810810

expect(getCallCount()).toBe(2); // 1 initial find + 1 EACCES poll

811811

});

@@ -826,8 +826,8 @@ describe.skipIf(isWindows)("restart-stale-pids", () => {

826826

});

827827828828

vi.spyOn(process, "kill").mockReturnValue(true);

829-

// Must return without throwing (proceeds with warning after budget expires)

830-

expect(() => cleanStaleGatewayProcessesSync()).not.toThrow();

829+

// Proceeds with warning after budget expires.

830+

expect(cleanStaleGatewayProcessesSync()).toContain(stalePid);

831831

});

832832833833

it("still polls for port-free when all stale pids were already dead at SIGTERM time", () => {

@@ -1199,8 +1199,8 @@ describe.skipIf(isWindows)("restart-stale-pids", () => {

11991199

});

12001200

});

12011201

vi.spyOn(process, "kill").mockReturnValue(true);

1202-

// Should complete cleanly — no openclaw pids in status-1 output free

1203-

expect(() => cleanStaleGatewayProcessesSync()).not.toThrow();

1202+

// No openclaw pids in status-1 output means the port is free for this cleanup.

1203+

expect(cleanStaleGatewayProcessesSync()).toContain(stalePid);

12041204

// Completed with one argv verification after the status-1 poll output:

12051205

// initial lsof + poll lsof + ps argv check.

12061206

expect(getCallCount()).toBe(3);