envoy
envoy copied to clipboard
Fix zipkin_test on big-endian systems
Commit Message: Fix //test/extensions/tracers/zipkin:zipkin_test on big-endian systems.
Additional Description: The subtest "ZipkinSpanBufferTest.SerializeSpan" was failing due to discrepancies in the id field of the expected JSON string and the serialized JSON representation. The expected id was AQAAAAAAAAA= but we were getting AAAAAAAAAAE= on s390x. This was only occurring when serializing the buffer with HTTP_PROTO whereas HTTP_JSON was working fine. On checking more into the serialized MessageToJsonString, I found that the hexadecimal representation of id was id: "\000\000\000\000\000\000\000\001" which is id:"AAAAAAAAAAE=" on s390x and that on Intel was id: "\001\000\000\000\000\000\000\000" which is id:"AQAAAAAAAAA=" . Further found that this is occurring due to endianness, and the value of id on both Intel and s390x is same in respective endianness and because the expected content is hard coded in little-endian format, it was failing on big-endian system.
Signed-off-by: Pandurang Khandeparker [email protected]
Risk Level: Low Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional API Considerations:]
Hi @pandurangkhandeparker, welcome and thank you for your contribution.
We will try to review your Pull Request as quickly as possible.
In the meantime, please take a look at the contribution guidelines if you have not done so already.
/retest
/retest