diff --git a/server/src/__tests__/chat-channels.integration.test.ts b/server/src/__tests__/chat-channels.integration.test.ts index 08c61039a80..97231f297f3 100644 --- a/server/src/__tests__/chat-channels.integration.test.ts +++ b/server/src/__tests__/chat-channels.integration.test.ts @@ -1122,6 +1122,7 @@ describeEmbeddedPostgres("chat channel control-plane integration", () => { // Do not expire or time out its connections on those virtual clock jumps. db = createDb(externalTestDatabaseUrl ?? tempDb!.connectionString, { idleTimeoutSeconds: 0, connectTimeoutSeconds: 0, maxLifetimeSeconds: 0, + ...(externalTestDatabaseUrl ? { maxConnections: 4 } : {}), }); }, 90_000); @@ -60453,7 +60454,8 @@ describeEmbeddedPostgres("chat channel control-plane integration", () => { const commentsBefore = await db .select({ id: issueComments.id }) .from(issueComments) - .where(eq(issueComments.issueId, conversation.issueId)); + .where(eq(issueComments.issueId, conversation.issueId)) + .orderBy(asc(issueComments.id)); const wakesBefore = wakeup.mock.calls.length; const reactionsBefore = providerRuntime.reactions.length; const postsBefore = providerRuntime.posts.length; @@ -60483,7 +60485,8 @@ describeEmbeddedPostgres("chat channel control-plane integration", () => { await db .select({ id: issueComments.id }) .from(issueComments) - .where(eq(issueComments.issueId, conversation.issueId)), + .where(eq(issueComments.issueId, conversation.issueId)) + .orderBy(asc(issueComments.id)), ).toEqual(commentsBefore); expect(wakeup).toHaveBeenCalledTimes(wakesBefore); expect(cancelRun).not.toHaveBeenCalled();