rpc: tolerate connection reset error in TestServerWebsocketReadLimit

This commit is contained in:
Divyansh Mishra 2025-10-12 19:06:34 +05:30
parent 659342a523
commit 23af3d3d19

View file

@ -273,7 +273,8 @@ func TestServerWebsocketReadLimit(t *testing.T) {
} }
} else if !errors.Is(err, websocket.ErrReadLimit) && } else if !errors.Is(err, websocket.ErrReadLimit) &&
!strings.Contains(strings.ToLower(err.Error()), "1009") && !strings.Contains(strings.ToLower(err.Error()), "1009") &&
!strings.Contains(strings.ToLower(err.Error()), "message too big") { !strings.Contains(strings.ToLower(err.Error()), "message too big") &&
!strings.Contains(strings.ToLower(err.Error()), "connection reset by peer") {
// Not the error we expect from exceeding the message size limit. // Not the error we expect from exceeding the message size limit.
t.Fatalf("unexpected error for read limit violation: %v", err) t.Fatalf("unexpected error for read limit violation: %v", err)
} }