Some test tidy for grpc-proxy on ProxyHappySuite
ProxyHappySuite
is used to test the behavior of a grpc-proxy server and seems kind of messy. This commit dropped some useless fields and made some logic tidy on SetupSuite
and TearDownSuite
.
As we have upgraded grpc-go
to v1.38.0, we can use the new provided ServerOption grpc.ForceServerCodec
to override server codec. ForceServerCodec
takes encoding.Codec
as parameter and works as a pair of the client side CallOption grpc.ForceCodec
. And we can get rid of the deprecated grpc.Codec
interface in grpc-proxy.
Refer to the related issue https://github.com/grpc/grpc-go/issues/3694 for details.
Edited by Xing Xin