Skip to content
Snippets Groups Projects
Commit b27fbb22 authored by fangyincheng's avatar fangyincheng
Browse files

Fix:problem about twoway

parent 6271fd10
No related branches found
No related tags found
No related merge requests found
......@@ -229,9 +229,9 @@ func (c *Client) call(ct CallType, addr string, svcUrl common.URL, method string
rsp.reply = reply
rsp.callback = callback
rsp.opts = opts
} else {
p.Header.Type = hessian.PackageRequest
}
// todo: it must be PackageRequest because of hessian2, but it is twoway actually
p.Header.Type = hessian.PackageRequest
var (
err error
......
......@@ -58,7 +58,7 @@ func TestDubboPackage_MarshalAndUnmarshal(t *testing.T) {
pkgres.Body = make([]interface{}, 7)
err = pkgres.Unmarshal(data)
assert.NoError(t, err)
assert.Equal(t, hessian.PackageRequest|hessian.PackageRequest_TwoWay, pkgres.Header.Type)
assert.Equal(t, hessian.PackageRequest, pkgres.Header.Type)
assert.Equal(t, byte(S_Dubbo), pkgres.Header.SerialID)
assert.Equal(t, int64(10086), pkgres.Header.ID)
assert.Equal(t, "2.5.4", pkgres.Body.([]interface{})[0])
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment