test(scaletest): fix websocket error during close (#11879)

Fixes #11735
This commit is contained in:
Mathias Fredriksson 2024-01-29 13:42:30 +02:00 committed by GitHub
parent 8398b4188b
commit 3e89ba23e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -296,6 +296,13 @@ func TestRun(t *testing.T) {
if err == nil || errors.Is(err, io.EOF) {
return
}
// Ignore policy violations, we expect these, e.g.:
//
// failed to get reader: received close frame: status = StatusPolicyViolation and reason = "timed out"
if websocket.CloseStatus(err) == websocket.StatusPolicyViolation {
return
}
t.Error(err)
}))
defer srv.Close()