diff --git a/pkg/generic/grpcjsonthrift_test/generic_init.go b/pkg/generic/grpcjsonthrift_test/generic_init.go index 5d2d44b751..f0a29b10b0 100644 --- a/pkg/generic/grpcjsonthrift_test/generic_init.go +++ b/pkg/generic/grpcjsonthrift_test/generic_init.go @@ -49,7 +49,7 @@ func newGenericStreamingClient(g generic.Generic, targetIPPort string) genericcl } func newGenericClient(g generic.Generic, targetIPPort string) genericclient.Client { - cli, err := genericclient.NewClient("destService", g, client.WithHostPorts(targetIPPort)) + cli, err := genericclient.NewClient("destService", g, client.WithHostPorts(targetIPPort), client.WithTransportProtocol(transport.TTHeader)) if err != nil { panic(err) } @@ -401,8 +401,8 @@ func newTestServiceEchoBizExceptionResult() interface{} { } func echoPingPongHandler(ctx context.Context, handler, arg, result interface{}) error { - realArg := kt.UnpackApacheCodec(arg).(*kt.TestServiceEchoPingPongArgs) - realResult := kt.UnpackApacheCodec(result).(*kt.TestServiceEchoPingPongResult) + realArg := arg.(*kt.TestServiceEchoPingPongArgs) + realResult := result.(*kt.TestServiceEchoPingPongResult) success, err := handler.(kt.TestService).EchoPingPong(ctx, realArg.Req) if err != nil { return err @@ -412,9 +412,9 @@ func echoPingPongHandler(ctx context.Context, handler, arg, result interface{}) } func newTestServiceEchoPingPongArgs() interface{} { - return kt.ToApacheCodec(kt.NewTestServiceEchoPingPongArgs()) + return kt.NewTestServiceEchoPingPongArgs() } func newTestServiceEchoPingPongResult() interface{} { - return kt.ToApacheCodec(kt.NewTestServiceEchoPingPongResult()) + return kt.NewTestServiceEchoPingPongResult() } diff --git a/pkg/remote/codec/thrift/thrift_data.go b/pkg/remote/codec/thrift/thrift_data.go index 4ff0ca9d9c..29a97ce702 100644 --- a/pkg/remote/codec/thrift/thrift_data.go +++ b/pkg/remote/codec/thrift/thrift_data.go @@ -155,7 +155,6 @@ func (c thriftCodec) fastUnmarshal(trans remote.ByteBuffer, data interface{}, da } // unmarshalThriftData only decodes the data (after methodName, msgType and seqId) -// method is only used for generic calls func (c thriftCodec) unmarshalThriftData(trans remote.ByteBuffer, data interface{}, dataLen int) error { // decode with hyper unmarshal if c.IsSet(FrugalRead) && c.hyperMessageUnmarshalAvailable(data, dataLen) {