Skip to content

Commit

Permalink
inspect ws close code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jardaliao authored Nov 22, 2023
1 parent 1b5ea31 commit fdaf534
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions transport/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,7 @@ func TestNewWSClient(t *testing.T) {
serverSession.Close()
select {
case code := <-done:
// refer to websocket.isValidReceivedCloseCode
assert.True(t, (code >= 1000 && code <= 1003) || (code >= 1007 && code <= 1013) || (code >= 3000 && code <= 4999))
assert.True(t, code == websocket.CloseNormalClosure)
case <-time.After(5e9):
assert.True(t, false)
}
Expand Down

0 comments on commit fdaf534

Please sign in to comment.