MCPcopy Create free account
hub / github.com/apache/dubbo-go / TestEncodeHeaderRequestTwoWay

Function TestEncodeHeaderRequestTwoWay

protocol/dubbo/impl/codec_test.go:138–148  ·  view source on GitHub ↗

TestEncodeHeaderRequestTwoWay tests EncodeHeader for two-way request packages

(t *testing.T)

Source from the content-addressed store, hash-verified

136
137// TestEncodeHeaderRequestTwoWay tests EncodeHeader for two-way request packages
138func TestEncodeHeaderRequestTwoWay(t *testing.T) {
139 codec := NewDubboCodec(nil)
140 pkg := NewDubboPackage(nil)
141 pkg.Header.Type = PackageRequest_TwoWay
142 pkg.Header.SerialID = constant.SHessian2
143 pkg.Header.ID = 22222
144
145 header := codec.EncodeHeader(*pkg)
146 assert.NotNil(t, header)
147 assert.NotEmpty(t, header)
148}
149
150// TestProtocolCodecSetSerializer tests SetSerializer method of ProtocolCodec
151func TestProtocolCodecSetSerializer(t *testing.T) {

Callers

nothing calls this directly

Calls 3

NewDubboCodecFunction · 0.85
NewDubboPackageFunction · 0.85
EncodeHeaderMethod · 0.80

Tested by

no test coverage detected