X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=core%2Fconnection_test.go;h=643d4a38ade235080d1c71f702353ebc6d7d9f45;hb=ceed73403bdb61387d04be8b47183e9c4a970749;hp=e6ef5d5538fc84130bae128c22833713ad97c00e;hpb=94620e85f0bdbb054af07ce3670fadc1f76cfdf0;p=govpp.git diff --git a/core/connection_test.go b/core/connection_test.go index e6ef5d5..643d4a3 100644 --- a/core/connection_test.go +++ b/core/connection_test.go @@ -92,7 +92,7 @@ func TestAsyncConnection(t *testing.T) { func TestCodec(t *testing.T) { RegisterTestingT(t) - msgCodec := &codec.MsgCodec{} + var msgCodec = codec.DefaultCodec // request data, err := msgCodec.EncodeMsg(&interfaces.CreateLoopback{MacAddress: interfaces.MacAddress{1, 2, 3, 4, 5, 6}}, 11) @@ -118,7 +118,7 @@ func TestCodec(t *testing.T) { func TestCodecNegative(t *testing.T) { RegisterTestingT(t) - msgCodec := &codec.MsgCodec{} + var msgCodec = codec.DefaultCodec // nil message for encoding data, err := msgCodec.EncodeMsg(nil, 15) @@ -134,7 +134,7 @@ func TestCodecNegative(t *testing.T) { // nil data for decoding err = msgCodec.DecodeMsg(nil, &vpe.ControlPingReply{}) Expect(err).Should(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("EOF")) + Expect(err.Error()).To(ContainSubstring("panic")) } func TestSimpleRequestsWithSequenceNumbers(t *testing.T) {