test(browser): drop flaky duplicate cdp health case · openclaw/openclaw@0da53b5
steipete
·
2026-04-23
·
via Recent Commits to openclaw:main
File tree
extensions/browser/src/browser
| Original file line number | Diff line number | Diff line change |
|---|
@@ -616,34 +616,6 @@ describe("chrome.ts internal", () => {
|
616 | 616 | }, |
617 | 617 | }); |
618 | 618 | }); |
619 | | - |
620 | | -it("guards against post-settled messages by dropping them", async () => { |
621 | | -// Emit two valid id=1 responses — the second must be dropped via the |
622 | | -// `if (settled) return;` guard at the top of onMessage. |
623 | | -await withMockChromeCdpServer({ |
624 | | -wsPath: "/devtools/browser/SETTLED", |
625 | | -onConnection: (wss) => { |
626 | | -wss.on("connection", (ws) => { |
627 | | -ws.on("message", (raw) => { |
628 | | -const text = rawDataToString(raw); |
629 | | -const msg = JSON.parse(text) as { id?: number }; |
630 | | -if (msg.id === 1) { |
631 | | -ws.send(JSON.stringify({ id: 1, result: { product: "Chrome" } })); |
632 | | -// Second message after settled — the onMessage guard |
633 | | -// should return early. |
634 | | -setTimeout( |
635 | | -() => ws.send(JSON.stringify({ id: 1, result: { product: "after" } })), |
636 | | -20, |
637 | | -); |
638 | | -} |
639 | | -}); |
640 | | -}); |
641 | | -}, |
642 | | -run: async (baseUrl) => { |
643 | | -await expect(isChromeCdpReady(baseUrl, 50, 10)).resolves.toBe(true); |
644 | | -}, |
645 | | -}); |
646 | | -}); |
647 | 619 | }); |
648 | 620 | |
649 | 621 | describe("isChromeCdpReady swallowed errors", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。