mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Removes 6 fragile `require.Equal(t, codersdk.ChatStatusPending, chat.Status)` assertions from chat relay and creation tests. **Root cause**: In HA tests with two replicas sharing the same DB, the worker can acquire a just-created chat (flipping `pending → running` via `AcquireChats`) before the HTTP response reaches the test. All affected tests already synchronize via `require.Eventually` waiting for `running` status, making the initial assertion both redundant and racy. - Remove 5 assertions in `enterprise/coderd/exp_chats_test.go` (all `TestChatStreamRelay` subtests) - Remove 1 assertion in `coderd/exp_chats_test.go` (`TestPostChats`) - An existing comment in `TestPostChats/Success` already documents this exact race Fixes flake: https://github.com/coder/coder/actions/runs/23807597632/job/69385425724 > 🤖 Written by a Coder Agent. Will be reviewed by a human.