You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "fangyincheng (GitHub)" <gi...@apache.org> on 2020/03/16 15:09:05 UTC
[GitHub] [dubbo-go-hessian2] fangyincheng commented on issue #166:
fix skip class fields.
Following ut is failed. it should be in `hessian_test.go`
```go
func TestHessianCodec_ReadAttachments(t *testing.T) {
body := &Response{
RspObj: &CaseB{A: "A", B: CaseA{A: "a", B: 1, C: Case{A: "c", B: 2}}},
Exception: nil,
Attachments: map[string]string{DUBBO_VERSION_KEY: "2.6.4"},
}
resp, err := doTestHessianEncodeHeader(t, PackageResponse, Response_OK, body)
assert.NoError(t, err)
pojoRegistry = POJORegistry{}
codecR1 := NewHessianCodec(bufio.NewReader(bytes.NewReader(resp)))
codecR2 := NewHessianCodec(bufio.NewReader(bytes.NewReader(resp)))
h := &DubboHeader{}
assert.NoError(t, codecR1.ReadHeader(h))
t.Log(h)
assert.NoError(t, codecR2.ReadHeader(h))
t.Log(h)
assert.Equal(t, "can not find go type name com.test.caseb in registry", codecR1.ReadBody(body).Error())
attrs, err := codecR2.ReadAttachments()
assert.NoError(t, err)
t.Log(attrs)
}
```
[ Full content available at: https://github.com/apache/dubbo-go-hessian2/pull/166 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org