Skip to content

Commit

Permalink
fixup! Websocket: Make WebsocketNotEnabled a real error
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Feb 5, 2024
1 parent ac5fe67 commit 52ebf55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exchanges/stream/websocket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ func TestTrafficMonitorTimeout(t *testing.T) {

func TestIsDisconnectionError(t *testing.T) {
t.Parallel()
assert.False(t, IsDisconnectionError(errors.New("errorText")), "IsADisconnectionError should return false")
assert.True(t, IsDisconnectionError(&websocket.CloseError{Code: 1006, Text: "errorText"}), "IsADisconnectionError should return true")
assert.False(t, IsDisconnectionError(&net.OpError{Err: errClosedConnection}), "IsADisconnectionError should return false")
assert.True(t, IsDisconnectionError(&net.OpError{Err: errors.New("errText")}), "IsADisconnectionError should return true")
assert.False(t, IsDisconnectionError(errors.New("errorText")), "IsDisconnectionError should return false")
assert.True(t, IsDisconnectionError(&websocket.CloseError{Code: 1006, Text: "errorText"}), "IsDisconnectionError should return true")
assert.False(t, IsDisconnectionError(&net.OpError{Err: errClosedConnection}), "IsDisconnectionError should return false")
assert.True(t, IsDisconnectionError(&net.OpError{Err: errors.New("errText")}), "IsDisconnectionError should return true")
}

func TestConnectionMessageErrors(t *testing.T) {
Expand Down

0 comments on commit 52ebf55

Please sign in to comment.