grpc-gateway
grpc-gateway copied to clipboard
Fixing TestOutgoingTrailerMatcher, which was non-deterministic
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