test: retry WhatsApp QA driver observation timeouts · openclaw/openclaw@0aae5ba
steipete
·
2026-05-17
·
via Recent Commits to openclaw:main
File tree
extensions/qa-lab/src/live-transports/whatsapp
| Original file line number | Diff line number | Diff line change |
|---|
@@ -195,6 +195,11 @@ describe("WhatsApp QA live runtime", () => {
|
195 | 195 | |
196 | 196 | it("classifies WhatsApp driver connection closures as retryable", () => { |
197 | 197 | expect(__testing.isTransientWhatsAppQaDriverError(new Error("Connection Closed"))).toBe(true); |
| 198 | +expect( |
| 199 | +__testing.isTransientWhatsAppQaDriverError( |
| 200 | +new Error("timed out waiting for WhatsApp QA driver message"), |
| 201 | +), |
| 202 | +).toBe(true); |
198 | 203 | expect(__testing.isTransientWhatsAppQaDriverError(new Error("timed out waiting"))).toBe(false); |
199 | 204 | }); |
200 | 205 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -472,7 +472,11 @@ function messageMatches(message: WhatsAppObservedMessage, matchText: string | Re
|
472 | 472 | } |
473 | 473 | |
474 | 474 | function isTransientWhatsAppQaDriverError(error: unknown) { |
475 | | -return /\bConnection Closed\b/iu.test(formatErrorMessage(error)); |
| 475 | +const message = formatErrorMessage(error); |
| 476 | +return ( |
| 477 | +/\bConnection Closed\b/iu.test(message) || |
| 478 | +/\btimed out waiting for WhatsApp QA driver message\b/iu.test(message) |
| 479 | +); |
476 | 480 | } |
477 | 481 | |
478 | 482 | async function restartWhatsAppQaDriverSession(params: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。