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

推荐订阅源

IT之家
IT之家
博客园_首页
S
SegmentFault 最新的问题
罗磊的独立博客
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
D
Docker
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
V
V2EX
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
腾讯CDC
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Help Net Security
博客园 - Franky
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏

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: speed up voice realtime tests · openclaw/openclaw@b...
shakkernerd · 2026-05-10 · via Recent Commits to openclaw:main

@@ -128,6 +128,13 @@ const startRealtimeServer = async (

128128

});

129129

};

130130131+

async function waitForRealtimeTest(

132+

callback: () => void | Promise<void>,

133+

options: { timeout?: number; interval?: number } = {},

134+

) {

135+

await vi.waitFor(callback, { interval: 1, ...options });

136+

}

137+131138

describe("RealtimeCallHandler path routing", () => {

132139

it("uses the request host and stream path in TwiML", () => {

133140

const handler = makeHandler();

@@ -213,7 +220,7 @@ describe("RealtimeCallHandler path routing", () => {

213220

start: { streamSid: "MZ-outbound", callSid: "CA-outbound" },

214221

}),

215222

);

216-

await vi.waitFor(() => {

223+

await waitForRealtimeTest(() => {

217224

expect(createBridge).toHaveBeenCalled();

218225

});

219226

callbacks?.onReady?.();

@@ -280,7 +287,7 @@ describe("RealtimeCallHandler path routing", () => {

280287

start: { streamSid: "MZ-silent", callSid: "CA-silent" },

281288

}),

282289

);

283-

await vi.waitFor(() => {

290+

await waitForRealtimeTest(() => {

284291

expect(createBridge).toHaveBeenCalled();

285292

});

286293

@@ -332,7 +339,7 @@ describe("RealtimeCallHandler path routing", () => {

332339

start: { streamSid: "MZ-speak", callSid: "CA-speak" },

333340

}),

334341

);

335-

await vi.waitFor(() => {

342+

await waitForRealtimeTest(() => {

336343

expect(createBridge).toHaveBeenCalled();

337344

});

338345

@@ -400,13 +407,13 @@ describe("RealtimeCallHandler path routing", () => {

400407

start: { streamSid: "MZ-complete", callSid: "CA-complete" },

401408

}),

402409

);

403-

await vi.waitFor(() => {

410+

await waitForRealtimeTest(() => {

404411

expect(createBridge).toHaveBeenCalled();

405412

});

406413407414

ws.send(JSON.stringify({ event: "stop" }));

408415409-

await vi.waitFor(() => {

416+

await waitForRealtimeTest(() => {

410417

const events = processEvent.mock.calls.map(([event]) => event as NormalizedEvent);

411418

const ended = events.find((event) => event.type === "call.ended");

412419

expect(ended).toBeDefined();

@@ -477,7 +484,7 @@ describe("RealtimeCallHandler path routing", () => {

477484

start: { streamSid: "MZ-talk-events", callSid: "CA-talk-events" },

478485

}),

479486

);

480-

await vi.waitFor(() => {

487+

await waitForRealtimeTest(() => {

481488

expect(createBridge).toHaveBeenCalled();

482489

});

483490

@@ -488,7 +495,7 @@ describe("RealtimeCallHandler path routing", () => {

488495

media: { payload: Buffer.from([0xff, 0xff]).toString("base64") },

489496

}),

490497

);

491-

await vi.waitFor(() => {

498+

await waitForRealtimeTest(() => {

492499

expect(sendAudio).toHaveBeenCalledWith(Buffer.from([0xff, 0xff]));

493500

});

494501

callbacks?.onTranscript?.("user", "hello", true);

@@ -575,7 +582,7 @@ describe("RealtimeCallHandler path routing", () => {

575582

start: { streamSid: "MZ-barge-in", callSid: "CA-barge-in" },

576583

}),

577584

);

578-

await vi.waitFor(() => {

585+

await waitForRealtimeTest(() => {

579586

expect(createBridge).toHaveBeenCalled();

580587

});

581588

@@ -584,7 +591,7 @@ describe("RealtimeCallHandler path routing", () => {

584591

ws.send(JSON.stringify({ event: "media", media: { payload: speechPayload } }));

585592

ws.send(JSON.stringify({ event: "media", media: { payload: speechPayload } }));

586593587-

await vi.waitFor(() => {

594+

await waitForRealtimeTest(() => {

588595

expect(sendAudio).toHaveBeenCalledTimes(2);

589596

});

590597

@@ -676,7 +683,7 @@ describe("RealtimeCallHandler path routing", () => {

676683

start: { streamSid: "MZ-tool", callSid: "CA-tool" },

677684

}),

678685

);

679-

await vi.waitFor(() => {

686+

await waitForRealtimeTest(() => {

680687

expect(createBridge).toHaveBeenCalled();

681688

});

682689

@@ -689,11 +696,11 @@ describe("RealtimeCallHandler path routing", () => {

689696

args: { question: "Are the basement lights on?" },

690697

});

691698

await vi.advanceTimersByTimeAsync(350);

692-

await vi.waitFor(() => {

699+

await waitForRealtimeTest(() => {

693700

expect(receivedPartialTranscript).toBe("Are the basement");

694701

});

695702696-

await vi.waitFor(() => {

703+

await waitForRealtimeTest(() => {

697704

const workingCall = submitToolResult.mock.calls.find(

698705

([callId]) => callId === "consult-call",

699706

);

@@ -708,7 +715,7 @@ describe("RealtimeCallHandler path routing", () => {

708715709716

resolveConsult?.({ text: "The basement lights are on." });

710717711-

await vi.waitFor(() => {

718+

await waitForRealtimeTest(() => {

712719

expect(submitToolResult).toHaveBeenLastCalledWith(

713720

"consult-call",

714721

{

@@ -726,7 +733,7 @@ describe("RealtimeCallHandler path routing", () => {

726733

args: {},

727734

});

728735729-

await vi.waitFor(() => {

736+

await waitForRealtimeTest(() => {

730737

expect(submitToolResult).toHaveBeenCalledWith("custom-call", { ok: true }, undefined);

731738

});

732739

expect(submitToolResult).not.toHaveBeenCalledWith("custom-call", expect.anything(), {

@@ -795,15 +802,15 @@ describe("RealtimeCallHandler path routing", () => {

795802

start: { streamSid: "MZ-force", callSid: "CA-force" },

796803

}),

797804

);

798-

await vi.waitFor(() => {

805+

await waitForRealtimeTest(() => {

799806

expect(createBridge).toHaveBeenCalled();

800807

});

801808802809

vi.useFakeTimers();

803810

callbacks?.onTranscript?.("user", "Create a smoke test file for me.", true);

804811

await vi.advanceTimersByTimeAsync(200);

805812806-

await vi.waitFor(() => {

813+

await waitForRealtimeTest(() => {

807814

expect(consult).toHaveBeenCalledTimes(1);

808815

});

809816

const [args, callId, context] = consult.mock.calls[0] ?? [];

@@ -814,7 +821,7 @@ describe("RealtimeCallHandler path routing", () => {

814821

});

815822

expect(callId).toBe("call-1");

816823

expect(context).toEqual({});

817-

await vi.waitFor(() => {

824+

await waitForRealtimeTest(() => {

818825

expect(sendUserMessage).toHaveBeenCalledWith(

819826

expect.stringContaining("I created the smoke test file."),

820827

);

@@ -875,7 +882,7 @@ describe("RealtimeCallHandler path routing", () => {

875882

start: { streamSid: "MZ-direct-turns", callSid: "CA-direct-turns" },

876883

}),

877884

);

878-

await vi.waitFor(() => {

885+

await waitForRealtimeTest(() => {

879886

expect(createBridge).toHaveBeenCalled();

880887

});

881888

@@ -955,7 +962,7 @@ describe("RealtimeCallHandler path routing", () => {

955962

start: { streamSid: "MZ-settle", callSid: "CA-settle" },

956963

}),

957964

);

958-

await vi.waitFor(() => {

965+

await waitForRealtimeTest(() => {

959966

expect(createBridge).toHaveBeenCalled();

960967

});

961968

@@ -971,7 +978,7 @@ describe("RealtimeCallHandler path routing", () => {

971978

callbacks?.onTranscript?.("user", "message.", false);

972979

await vi.advanceTimersByTimeAsync(350);

973980974-

await vi.waitFor(

981+

await waitForRealtimeTest(

975982

() => {

976983

expect(consult).toHaveBeenCalledTimes(1);

977984

},

@@ -985,7 +992,7 @@ describe("RealtimeCallHandler path routing", () => {

985992

);

986993

expect(callId).toBe("call-1");

987994

expect(context).toEqual({ partialUserTranscript: "Send a Discord message." });

988-

await vi.waitFor(() => {

995+

await waitForRealtimeTest(() => {

989996

expect(submitToolResult).toHaveBeenLastCalledWith(

990997

"consult-call",

991998

{ text: "I sent it." },

@@ -1057,7 +1064,7 @@ describe("RealtimeCallHandler path routing", () => {

10571064

start: { streamSid: "MZ-native", callSid: "CA-native" },

10581065

}),

10591066

);

1060-

await vi.waitFor(() => {

1067+

await waitForRealtimeTest(() => {

10611068

expect(createBridge).toHaveBeenCalled();

10621069

});

10631070

@@ -1070,7 +1077,7 @@ describe("RealtimeCallHandler path routing", () => {

10701077

args: { question: "Send me a Discord message." },

10711078

});

107210791073-

await vi.waitFor(() => {

1080+

await waitForRealtimeTest(() => {

10741081

expect(submitToolResult).toHaveBeenLastCalledWith(

10751082

"consult-call",

10761083

{ text: "Native consult result." },

@@ -1150,7 +1157,7 @@ describe("RealtimeCallHandler path routing", () => {

11501157

start: { streamSid: "MZ-fast", callSid: "CA-fast" },

11511158

}),

11521159

);

1153-

await vi.waitFor(() => {

1160+

await waitForRealtimeTest(() => {

11541161

expect(createBridge).toHaveBeenCalled();

11551162

});

11561163

@@ -1161,7 +1168,7 @@ describe("RealtimeCallHandler path routing", () => {

11611168

args: { question: "What do you remember?" },

11621169

});

116311701164-

await vi.waitFor(() => {

1171+

await waitForRealtimeTest(() => {

11651172

expect(submitToolResult).toHaveBeenCalledWith(

11661173

"consult-call",

11671174

{ text: "Fast context." },

@@ -1220,7 +1227,7 @@ describe("RealtimeCallHandler websocket hardening", () => {

12201227

start: { streamSid: "MZ-backpressure", callSid: "CA-backpressure" },

12211228

}),

12221229

);

1223-

await vi.waitFor(() => {

1230+

await waitForRealtimeTest(() => {

12241231

if (!sendProviderAudio) {

12251232

throw new Error("expected realtime provider audio sender");

12261233

}