Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ [pkg/io] Skip encoding/decoding of data for 0-length binary data
- Update pkg/io serializer to encode/decode only the length and skip the data for marshaler/unmarshaler type, when the length is zero. - It is necessary as the GenericSerializer tests for State, Transaction etc., were ocassionally failing due to error in Encoding NoApp,NoData. - Test failed because, in GenericSerializer tests, we use a synchronous read,write pipe for testing. In case of zero length byte array, since nothing needs to be written to or read from the pipe, the decoder occasionally finished reading and closed the pipe before encoder had completed writing. And, this caused the encoder's write to fail. Signed-off-by: Manoranjith <[email protected]>
- Loading branch information