Chat tests: accept text deltas joined in a subscriber's queue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 00:41:48 +00:00
parent c316bc9bc8
commit c7e0b8b84e
2 changed files with 9 additions and 5 deletions
+2 -1
View File
@@ -313,8 +313,9 @@ func TestChatFanoutToSeveralClients(t *testing.T) {
name string
conn *websocket.Conn
}{{"phone", phone}, {"tablet", tablet}} {
// Deltas still queued for a client may arrive joined into one frame.
var text strings.Builder
for i := 0; i < 2; i++ {
for i := 0; text.Len() < len("hello"); i++ {
frame := nextEvent(t, ctx, client.conn)
if frame.Kind != protocol.ChatEventText {
t.Fatalf("%s frame %d = %+v, want text", client.name, i, frame)