Repository navigation
Fix ResponseCompression tests to work with different zlib implementations - #63988
Conversation
|
Thanks a lot for the contribution @medhatiwari! This is a great change and allows us to run our tests against multiple zlib implementations! Ideally we'd want to run the tests in CI against both of those to have coverage and detect regressions but this is a good first step. The tradeoff here of losing brittleness for flexibility feels worth it, especially due to the improvement in correctness coverage. cc: @BrennanConroy @akoeplinger any other thoughts here or can we go ahead and merge this in? |
BrennanConroy
left a comment
There was a problem hiding this comment.
The general idea is good.
|
Can this be merged , if there are no more code changes needed ? |
| [InlineData(new[] { "identity;q=0.5", "gzip" }, 29)] | ||
| public async Task Request_AcceptWithHigherCompressionQuality_Compressed(string[] acceptEncodings, int expectedBodyLength) | ||
| { | ||
| _ = expectedBodyLength; // Parameter kept for test data compatibility |
There was a problem hiding this comment.
nit: I don't think we care about preserving the test data from past runs for comparison here. Can just remove this param from where it's needed.
There was a problem hiding this comment.
removed all the unused expectedBodyLength parameters and discard assignments
Fix ResponseCompression tests for system zlib compatibility
Fixes #63969
Changes
CheckResponseCompressedCheckCompressionFunctionalitymethod to verify compression by decompressing contentTesting
All existing tests pass with both zlib-ng and system zlib implementations.
cc: @giritrivedi