Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina-Sakai committed Aug 26, 2024
1 parent ffe667b commit 1a40333
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/generic/grpcjsonthrift_test/generic_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand All @@ -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()
}
1 change: 0 additions & 1 deletion pkg/remote/codec/thrift/thrift_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1a40333

Please sign in to comment.