Skip to content

Commit

Permalink
Fix src/trafficcontroller/internal/proxy/firehose_handler_test.go
Browse files Browse the repository at this point in the history
This test was failing with the new gorilla/websocket.
  • Loading branch information
ctlong committed Dec 15, 2023
1 parent 41df29f commit 3db0598
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/trafficcontroller/internal/proxy/firehose_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package proxy_test

import (
"errors"
"fmt"
"net/http"
"net/http/httptest"
"strings"
Expand Down Expand Up @@ -178,11 +177,14 @@ var _ = Describe("FirehoseHandler", func() {
)
Expect(err).ToNot(HaveOccurred())

f := func() string {
f := func() error {
_, _, err := conn.ReadMessage()
return fmt.Sprintf("%s", err)
return err
}
Eventually(f).Should(ContainSubstring("websocket: close 1000"))
Eventually(f).Should(MatchError(&websocket.CloseError{
Code: websocket.CloseNormalClosure,
Text: "",
}))
})

It("emits the number of connections as a metric", func() {
Expand Down

0 comments on commit 3db0598

Please sign in to comment.