Skip to content

ResponseCompressionMiddlewareTests failing in release/8.0 on Fedora41 #59870

Open

Description

@wtgodbe

Failing Test(s)

  • Failed Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.SendFileAsync_AfterFirstWrite_CompressesAndFlushes

Error Message

2025-01-14T10:02:12.7516868Z Expected: 46
2025-01-14T10:02:12.7516920Z Actual:   43

Stacktrace

Details
2025-01-14T10:02:12.7532953Z      at Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.CheckResponseCompressed(HttpResponseMessage response, Nullable`1 expectedBodyLength, String expectedEncoding) in /_/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs:line 1303
2025-01-14T10:02:12.7533052Z    at Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.SendFileAsync_AfterFirstWrite_CompressesAndFlushes() in /_/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs:line 1167

Logs

Details

Build

https://dev.azure.com/dnceng-public/public/_build/results?buildId=916632&view=results

Other tests such as Failed Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.SendFileAsync_FirstWrite_CompressesAndFlushes fail in a similar way:

2025-01-14T10:02:13.9643316Z Expected: 34
2025-01-14T10:02:13.9643333Z Actual: 31

Likely related to the recent update from Fedore38 to Fedora41

Activity

  1. ghost added
    area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewares
    on Jan 14, 2025
  2. wtgodbe commented on Jan 14, 2025

    @wtgodbe
    MemberAuthor

    CC @adityamandaleeka new 8.0 test failures on Fedora41

  3. BrennanConroy commented on Jan 14, 2025

    @BrennanConroy
    Member

    Compression (at least zlib probably other algorithms too) don't have a guaranteed size between algorithm versions. We either do the simple "fix" of changing the expected size, or we try to be a little looser in our checks by checking a range potentially.

    e.g.
    Assert.InRange(compressedSize, 20, 40);

  4. wtgodbe commented on Jan 14, 2025

    @wtgodbe
    MemberAuthor

    Did we already make that change in main? I don't see the same failures there

  5. BrennanConroy commented on Jan 14, 2025

    @BrennanConroy
    Member

    I remember we did the lazy fix during a runtime update when the runtime changed the zlib library. It might not be affected by the OS change in the same way.

  6. wtgodbe commented on Jan 14, 2025

    @wtgodbe
    MemberAuthor

    Looks like that was #56684 - that doesn't touch SendFileAsync_AfterFirstWrite_CompressesAndFlushes though, so it's not obvious to me why we're not seeing failure on main

  7. BrennanConroy commented on Jan 14, 2025

    @BrennanConroy
    Member

    runtime changed the zlib library. It might not be affected by the OS change in the same way.

  8. wtgodbe commented on Jan 14, 2025

    @wtgodbe
    MemberAuthor

    Should we just update the 8.0 tests to use a range then? Are you the right person to make the fix?

  9. added this to the Backlog milestone on Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewarestest-failure

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions