From 62bb4447993c2038db180f8763cd70d7d3274639 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Wed, 17 Jun 2026 02:26:39 -0700 Subject: [PATCH] Stabilize remote runtime mixed subscription test --- .../remote-runtime-request-connection.integration.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/runtime/remote-runtime-request-connection.integration.test.ts b/src/main/runtime/remote-runtime-request-connection.integration.test.ts index d59cdecbc30..9d6c3920b55 100644 --- a/src/main/runtime/remote-runtime-request-connection.integration.test.ts +++ b/src/main/runtime/remote-runtime-request-connection.integration.test.ts @@ -428,12 +428,14 @@ describe('remote runtime request connection integration', () => { }) }) ) + // Why: CI can register subscription cleanups before the first + // response crosses the shared-control socket. await waitFor( - () => subscriptionCleanups.size >= mixedSubscriptions.length + 1, + () => + subscriptionCleanups.size >= mixedSubscriptions.length + 1 && mixedEvents.length > 0, 5000, () => `cleanup count ${subscriptionCleanups.size}, event count ${mixedEvents.length}` ) - expect(mixedEvents.length).toBeGreaterThan(0) expect( (server as unknown as { wsConnectionIds: Map }).wsConnectionIds.size ).toBe(1)