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

推荐订阅源

有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
V
V2EX
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
罗磊的独立博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
月光博客
月光博客
云风的 BLOG
云风的 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
fix(e2e): wait for Parallels update cleanup · openclaw/op...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main
11

// Parallels Update Job Timeout tests cover parallels update job timeout script behavior.

2+

import { spawnSync } from "node:child_process";

3+

import path from "node:path";

4+

import { pathToFileURL } from "node:url";

25

import { afterEach, describe, expect, it, vi } from "vitest";

36

import { runTimedUpdateJob } from "../../scripts/e2e/parallels/update-job-timeout.ts";

47

@@ -76,6 +79,7 @@ describe("Parallels update job timeout", () => {

7679

const writeLog = vi.fn(async () => undefined);

77807881

const result = runTimedUpdateJob({

82+

abortSettleMs: 1,

7983

append: (chunk) => chunks.push(chunk),

8084

label: "Windows",

8185

run: () => new Promise(() => {}),

@@ -84,7 +88,7 @@ describe("Parallels update job timeout", () => {

8488

writeLog,

8589

});

869087-

await vi.advanceTimersByTimeAsync(1000);

91+

await vi.advanceTimersByTimeAsync(1001);

8892

await expect(result).resolves.toBe(1);

8993

expect(chunks).toEqual(["Windows update timed out after 1s\n"]);

9094

expect(writeLog).toHaveBeenCalledTimes(1);

@@ -121,4 +125,80 @@ describe("Parallels update job timeout", () => {

121125

expect(chunks).toEqual(["Linux update timed out after 1s plus cleanup backstop\n"]);

122126

expect(writeLog).toHaveBeenCalledTimes(1);

123127

});

128+129+

it("waits for abort-aware cleanup before writing the job log", async () => {

130+

vi.useFakeTimers();

131+

const events: string[] = [];

132+133+

const result = runTimedUpdateJob({

134+

abortSettleMs: 250,

135+

append: (chunk) => events.push(chunk.trim()),

136+

label: "macOS",

137+

run: ({ signal }) =>

138+

new Promise<void>((resolve) => {

139+

signal.addEventListener(

140+

"abort",

141+

() => {

142+

events.push("abort");

143+

setTimeout(() => {

144+

events.push("cleanup");

145+

resolve();

146+

}, 25);

147+

},

148+

{ once: true },

149+

);

150+

}),

151+

timeoutDescription: "1s plus cleanup backstop",

152+

timeoutMs: 1000,

153+

writeLog: async () => {

154+

events.push("writeLog");

155+

},

156+

});

157+158+

await vi.advanceTimersByTimeAsync(1025);

159+

await expect(result).resolves.toBe(1);

160+

expect(events).toEqual([

161+

"macOS update timed out after 1s plus cleanup backstop",

162+

"abort",

163+

"cleanup",

164+

"writeLog",

165+

]);

166+

});

167+168+

it("keeps the process alive long enough to write logs for hung runners", () => {

169+

const moduleUrl = pathToFileURL(

170+

path.resolve("scripts/e2e/parallels/update-job-timeout.ts"),

171+

).href;

172+

const probe = `

173+

import { runTimedUpdateJob } from ${JSON.stringify(moduleUrl)};

174+

const events = [];

175+

const result = await runTimedUpdateJob({

176+

abortSettleMs: 25,

177+

append: (chunk) => events.push(chunk.trim()),

178+

label: "Linux",

179+

run: () => new Promise(() => {}),

180+

timeoutDescription: "10ms",

181+

timeoutMs: 10,

182+

writeLog: async () => events.push("writeLog"),

183+

});

184+

console.log(JSON.stringify({ events, result }));

185+

`;

186+187+

const child = spawnSync(

188+

process.execPath,

189+

["--import", "tsx", "--input-type=module", "--eval", probe],

190+

{

191+

cwd: process.cwd(),

192+

encoding: "utf8",

193+

timeout: 5_000,

194+

},

195+

);

196+197+

expect(child.stderr).toBe("");

198+

expect(child.status).toBe(0);

199+

expect(JSON.parse(child.stdout)).toEqual({

200+

events: ["Linux update timed out after 10ms", "writeLog"],

201+

result: 1,

202+

});

203+

});

124204

});