diff --git a/pkg/node/protocol_test.go b/pkg/node/protocol_test.go index 90b50cf..6816607 100644 --- a/pkg/node/protocol_test.go +++ b/pkg/node/protocol_test.go @@ -48,7 +48,7 @@ func TestProtocol_ValidateResponse_Bad(t *testing.T) { // // msg, _ := NewMessage(MsgPong, "sender", "receiver", nil) // err := handler.ValidateResponse(msg, MsgStats) -// if IsProtocolError(err) { t.Error("type mismatch is not a ProtocolError") } +// if !IsProtocolError(err) { t.Error("type mismatch must be a ProtocolError") } func TestProtocol_ValidateResponse_Ugly(t *testing.T) { handler := &ResponseHandler{} @@ -57,8 +57,8 @@ func TestProtocol_ValidateResponse_Ugly(t *testing.T) { if err == nil { t.Error("expected error for wrong type") } - if IsProtocolError(err) { - t.Error("type mismatch should not produce a ProtocolError") + if !IsProtocolError(err) { + t.Error("type mismatch must produce a ProtocolError") } }