Following ut is failed.  it should be in `hessian_test.go`
```go
type CaseB struct {
        A string
        B CaseA
}

func (c *CaseB) JavaClassName() string {
        return "com.test.caseb"
}

type CaseA struct {
        A string
        B int
       C Case
}

func (c *CaseA) JavaClassName() string {
        return "com.test.casea"
}

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 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to