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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user