Close websocket handshake response in test
CI / Test (server-http) (pull_request) Successful in 5s
CI / Test (rest) (pull_request) Successful in 23s
CI / Lint (pull_request) Successful in 10s
CI / Build (windows/amd64) (pull_request) Successful in 7s
CI / Test (store) (pull_request) Successful in 41s
CI / Build (linux/amd64) (pull_request) Successful in 8s
CI / Build (linux/arm64) (pull_request) Successful in 6s
e2e / Playwright vs docker-compose (pull_request) Successful in 1m24s

This commit is contained in:
2026-08-22 10:53:51 +01:00
parent 2110c7dab4
commit 750a06384b
+4 -1
View File
@@ -129,9 +129,12 @@ func TestWSAcceptsSnapshotReportLargerThanDefaultReadLimit(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel() defer cancel()
c, _, err := websocket.Dial(ctx, url, &websocket.DialOptions{ c, resp, err := websocket.Dial(ctx, url, &websocket.DialOptions{
HTTPHeader: stdhttp.Header{"Authorization": []string{"Bearer " + token}}, HTTPHeader: stdhttp.Header{"Authorization": []string{"Bearer " + token}},
}) })
if resp != nil && resp.Body != nil {
defer resp.Body.Close() //nolint:errcheck
}
if err != nil { if err != nil {
t.Fatalf("dial: %v", err) t.Fatalf("dial: %v", err)
} }