mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 11:37:26 +00:00
fix: harden relay navigate retry tests (#30612) (thanks @Sid-Qin)
This commit is contained in:
@@ -38,6 +38,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- Browser/Relay navigation recovery: retry once after detached-frame and closed-target navigation errors by forcing a CDP reconnect, reducing transient relay navigation failures during renderer swaps. (#30612) Thanks @Sid-Qin.
|
||||
- Browser/Remote CDP ownership checks: skip local-process ownership errors for non-loopback remote CDP profiles when HTTP is reachable but the websocket handshake fails, and surface the remote websocket attach/retry path instead. (#15582) Landed from contributor (#28780) Thanks @stubbi, @bsormagec, @unblockedgamesstudio and @vincentkoc.
|
||||
- Docker/Image health checks: add Dockerfile `HEALTHCHECK` that probes gateway `GET /healthz` so container runtimes can mark unhealthy instances without requiring auth credentials in the probe command. (#11478) Thanks @U-C4N and @vincentkoc.
|
||||
- Daemon/systemd checks in containers: treat missing `systemctl` invocations (including `spawn systemctl ENOENT`/`EACCES`) as unavailable service state during `is-enabled` checks, preventing container flows from failing with `Gateway service check failed` before install/status handling can continue. (#26089) Thanks @sahilsatralkar and @vincentkoc.
|
||||
|
||||
@@ -75,4 +75,26 @@ describe("pw-tools-core.snapshot navigate guard", () => {
|
||||
expect(goto).toHaveBeenCalledTimes(2);
|
||||
expect(result.url).toBe("https://example.com/recovered");
|
||||
});
|
||||
|
||||
it("does not reconnect for non-retryable navigation failures", async () => {
|
||||
const goto = vi
|
||||
.fn<(...args: unknown[]) => Promise<void>>()
|
||||
.mockRejectedValueOnce(new Error("net::ERR_ABORTED"));
|
||||
setPwToolsCoreCurrentPage({
|
||||
goto,
|
||||
url: vi.fn(() => "https://example.com/aborted"),
|
||||
});
|
||||
|
||||
await expect(
|
||||
mod.navigateViaPlaywright({
|
||||
cdpUrl: "http://127.0.0.1:18792",
|
||||
targetId: "tab-1",
|
||||
url: "https://example.com/aborted",
|
||||
ssrfPolicy: { allowPrivateNetwork: true },
|
||||
}),
|
||||
).rejects.toThrow("net::ERR_ABORTED");
|
||||
|
||||
expect(getPwToolsCoreSessionMocks().forceDisconnectPlaywrightForTarget).not.toHaveBeenCalled();
|
||||
expect(getPwToolsCoreSessionMocks().getPageForTargetId).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user