Skip to content

[release/8.0] Fix ResponseCompressionMiddleware tests - #60884

Merged
wtgodbe merged 7 commits into
release/8.0from
wtgodbe/rcmtest
Sep 5, 2026
Merged

wtgodbe merged 7 commits into
release/8.0from
wtgodbe/rcmtest

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Mar 11, 2025 •

Copy link
Copy Markdown
Member

Compression size is no longer guaranteed on Fedora41, so instead check that the size is within a reasonable range (+/- 5)

Fixes #59870

Copilot AI review requested due to automatic review settings March 11, 2025 21:28
@wtgodbe
wtgodbe requested a review from BrennanConroy as a code owner March 11, 2025 21:28
@ghost ghost added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label Mar 11, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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);

@dotnet-policy-service dotnet-policy-service Bot added this to the 8.0.x milestone Mar 11, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hi @wtgodbe. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@wtgodbe

wtgodbe commented Mar 11, 2025 •

Copy link
Copy Markdown
Member Author

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Mar 19, 2025
Comment thread src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs Outdated
@Youssef1313

Copy link
Copy Markdown
Member

@wtgodbe @BrennanConroy Is this still an issue for release/8.0? Are we seeing it failing in any recent release/8.0 builds?

@akoeplinger

Copy link
Copy Markdown
Member

Co-authored-by: Brennan <brecon@microsoft.com>
@akoeplinger akoeplinger removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Sep 4, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares tell-mode Indicates a PR which is being merged during tell-mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants