mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 20:21:23 +00:00
perf: add zero-delay gateway client connect for tests
This commit is contained in:
@@ -69,6 +69,7 @@ describe("GatewayClient", () => {
|
||||
const closed = new Promise<{ code: number; reason: string }>((resolve) => {
|
||||
const client = new GatewayClient({
|
||||
url: `ws://127.0.0.1:${port}`,
|
||||
connectDelayMs: 0,
|
||||
onClose: (code, reason) => resolve({ code, reason }),
|
||||
});
|
||||
client.start();
|
||||
@@ -158,6 +159,7 @@ r1USnb+wUdA7Zoj/mQ==
|
||||
}, 2000);
|
||||
client = new GatewayClient({
|
||||
url: `wss://127.0.0.1:${port}`,
|
||||
connectDelayMs: 0,
|
||||
tlsFingerprint: "deadbeef",
|
||||
onConnectError: (err) => {
|
||||
clearTimeout(timeout);
|
||||
|
||||
Reference in New Issue
Block a user