grpc-gateway icon indicating copy to clipboard operation
grpc-gateway copied to clipboard

Fixing TestOutgoingTrailerMatcher, which was non-deterministic

Open joshgarnett opened this issue 9 months ago • 0 comments

Recently the test was updated to also check the headers. The test will sometimes fail when checking the headers returned, when there were multiple pairs added to the TrailerMD. This is caused by the TrailerMD being a map, which has a non-deterministic read order. The simple fix is to just sorts the Trailer headers returned before comparing.

Fixes #4264

joshgarnett avatar Apr 27 '24 10:04 joshgarnett