Order Discord metadata-only comment snapshots deterministically

Keep exact comment membership assertions stable across PostgreSQL row orders and bound the existing external integration fixture with a typed four-connection option.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-11-02 14:17:54 -06:00
1 parent 9ae6938ae4
commit d2dd942bd0
1 file changed
+5 -2
@@ -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();