From e7e95e69700ed4c94c89d88bdf7d674a55053961 Mon Sep 17 00:00:00 2001 From: Sergey Galuza Date: Wed, 14 Jan 2026 13:57:44 +0100 Subject: [PATCH] fix: increase timeout in connection tracking test for CI Built [OnSteroids](https://onsteroids.ai) Co-Authored-By: OnSteroids --- tests/unit/cliproxy/https-tunnel-proxy.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/cliproxy/https-tunnel-proxy.test.ts b/tests/unit/cliproxy/https-tunnel-proxy.test.ts index 08690b94..f4e40422 100644 --- a/tests/unit/cliproxy/https-tunnel-proxy.test.ts +++ b/tests/unit/cliproxy/https-tunnel-proxy.test.ts @@ -284,8 +284,12 @@ BAMMCGxvY2FsaG9zdDAeFw0yNDAxMDEwMDAwMDBaFw0yNTAxMDEwMDAwMDBaMBMx // Stop should forcefully close connections tunnel.stop(); - // Socket should be destroyed - await new Promise((resolve) => setTimeout(resolve, 50)); + // Socket should be destroyed (allow more time for CI environments) + // Wait up to 500ms for socket to be destroyed + for (let i = 0; i < 10; i++) { + if (socket.destroyed) break; + await new Promise((resolve) => setTimeout(resolve, 50)); + } expect(socket.destroyed).toBe(true); }); });