TestEncodeHeaderResponseWithError tests EncodeHeader for error response packages
(t *testing.T)
| 122 | |
| 123 | // TestEncodeHeaderResponseWithError tests EncodeHeader for error response packages |
| 124 | func TestEncodeHeaderResponseWithError(t *testing.T) { |
| 125 | codec := NewDubboCodec(nil) |
| 126 | pkg := NewDubboPackage(nil) |
| 127 | pkg.Header.Type = PackageResponse |
| 128 | pkg.Header.ResponseStatus = Response_SERVICE_ERROR |
| 129 | pkg.Header.SerialID = constant.SHessian2 |
| 130 | pkg.Header.ID = 11111 |
| 131 | |
| 132 | header := codec.EncodeHeader(*pkg) |
| 133 | assert.NotNil(t, header) |
| 134 | assert.Equal(t, Response_SERVICE_ERROR, header[3]) |
| 135 | } |
| 136 | |
| 137 | // TestEncodeHeaderRequestTwoWay tests EncodeHeader for two-way request packages |
| 138 | func TestEncodeHeaderRequestTwoWay(t *testing.T) { |
nothing calls this directly
no test coverage detected