From 907f19e08ff12b35d6767a45a17924f94ba6d5d3 Mon Sep 17 00:00:00 2001 From: divyanshujethi Date: Sat, 7 Nov 2026 07:10:12 +0530 Subject: [PATCH 1/2] fix(tests): eliminate race condition in postgres-proxy safe query passthrough test --- tests/postgres-proxy.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/postgres-proxy.test.ts b/tests/postgres-proxy.test.ts index 987e324..6411b59 100644 --- a/tests/postgres-proxy.test.ts +++ b/tests/postgres-proxy.test.ts @@ -244,7 +244,7 @@ test("PostgresWireProxy - End-to-end TCP interceptor workflow", async () => { receivedClientPackets.length = 0; receivedUpstreamQueries = []; client.write(buildQueryPacket("SELECT id, name FROM users WHERE id = 1;")); - for (let i = 0; i < 25 && receivedUpstreamQueries.length === 0; i++) { + for (let i = 0; i < 25 && (receivedUpstreamQueries.length === 0 || !Buffer.concat(receivedClientPackets).includes(0x5a)); i++) { await new Promise((r) => setTimeout(r, 20)); } From 54ebe8a3032211dc4dfcc4c989bd506a0916c8c9 Mon Sep 17 00:00:00 2001 From: divyanshujethi Date: Sat, 7 Nov 2026 07:11:08 +0530 Subject: [PATCH 2/2] style: format postgres-proxy.test.ts with biome --- tests/postgres-proxy.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/postgres-proxy.test.ts b/tests/postgres-proxy.test.ts index 6411b59..d083299 100644 --- a/tests/postgres-proxy.test.ts +++ b/tests/postgres-proxy.test.ts @@ -244,7 +244,13 @@ test("PostgresWireProxy - End-to-end TCP interceptor workflow", async () => { receivedClientPackets.length = 0; receivedUpstreamQueries = []; client.write(buildQueryPacket("SELECT id, name FROM users WHERE id = 1;")); - for (let i = 0; i < 25 && (receivedUpstreamQueries.length === 0 || !Buffer.concat(receivedClientPackets).includes(0x5a)); i++) { + for ( + let i = 0; + i < 25 && + (receivedUpstreamQueries.length === 0 || + !Buffer.concat(receivedClientPackets).includes(0x5a)); + i++ + ) { await new Promise((r) => setTimeout(r, 20)); }