test(coderd/x/chatd): deflake advisor chain mode snapshot (#25021)

`TestAdvisorChainMode_SnapshotKeepsFullHistory` was using the generic
active chatd test server, which leaves periodic pending-chat polling
enabled. That made the test inconsistent with the other OpenAI Responses
API tests and allowed stale pending pubsub notifications to interrupt
the second turn before the advisor request was observed.

Use the existing OpenAI Responses test server helper so pending-chat
acquisition is delayed and the test only starts processing after the
SendMessage pending notification has been published.

Closes https://github.com/coder/internal/issues/1510
This commit is contained in:
Ethan
2026-05-07 17:12:12 +10:00
committed by GitHub
parent ef0151601e
commit 100ebd9f3b
+1 -1
View File
@@ -9961,7 +9961,7 @@ func TestAdvisorChainMode_SnapshotKeepsFullHistory(t *testing.T) {
MaxUsesPerRun: 3,
MaxOutputTokens: 16384,
})
server := newActiveTestServer(t, db, ps)
server := newOpenAIResponsesTestServer(t, db, ps)
chat, err := server.CreateChat(ctx, chatd.CreateOptions{
OrganizationID: org.ID,