From 09ada1e14f67c37708563b7553e0817b7a673d33 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 3 Nov 2026 09:15:22 +0100 Subject: [PATCH] test(client): deliver bulk response before the queued pong --- packages/client/src/daemon-client.test.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/client/src/daemon-client.test.ts b/packages/client/src/daemon-client.test.ts index 645bc0c3f1..4f48553907 100644 --- a/packages/client/src/daemon-client.test.ts +++ b/packages/client/src/daemon-client.test.ts @@ -659,11 +659,26 @@ class FakeDaemon { finishTransfer(): void { // Four MiB of JSON whitespace precedes this valid application message. - const bytes = new TextEncoder().encode('{"type":"pong"}'); + const bytes = new TextEncoder().encode( + JSON.stringify({ + type: "session", + message: { + type: "status", + payload: { + status: "server_info", + serverId: "srv_heartbeat_test", + hostname: null, + version: null, + features: { binaryChunkingV1: true }, + }, + }, + }), + ); const frame = new Uint8Array(bytes.length + 4); frame.set([0x31, 1, 0, 2]); frame.set(bytes, 4); this.onMessage(frame); + this.onMessage(JSON.stringify({ type: "pong" })); this.daemonAnswersPingsAfter("fast"); }