-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0] Fix ResponseCompressionMiddleware tests #60884
base: release/8.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the ResponseCompressionMiddleware tests to account for Fedora41's variable compression sizes by checking that the body length is within a reasonable range.
- Modified test to use an in-range assertion for ContentLength
- Retains the original equality assertion which may lead to conflicting behavior
Comments suppressed due to low confidence (1)
src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs:1327
- The equality assertion conflicts with the new in-range assertion. Consider removing or updating this equality check to avoid failure on Fedora41 where the compression size may vary.
Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength);
Hi @wtgodbe. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document. |
src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs
Outdated
Show resolved
Hide resolved
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
Compression size is no longer guaranteed on Fedora41, so instead check that the size is within a reasonable range (+/- 5)
Fixes #59870