mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-10 21:22:11 +00:00
[PR #1000] [MERGED] Fix Windows test failures due to ArrayPool buffer sizing #1419
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/1000
Author: @Copilot
Created: 10/29/2025
Status: ✅ Merged
Merged: 10/29/2025
Merged by: @adamhathcock
Base:
adam/async-rar-ai← Head:copilot/sub-pr-996📝 Commits (2)
e786e95Initial plan88b3a66Fix Windows test failures in SharpCompressStreamTests📊 Changes
2 files changed (+13 additions, -13 deletions)
View changed files
📝
src/SharpCompress/packages.lock.json(+3 -3)📝
tests/SharpCompress.Test/Streams/SharpCompressStreamTest.cs(+10 -10)📄 Description
Windows tests failed because
ArrayPool<byte>.Shared.Rent()returns buffers larger than requested on Windows but not on Linux. Tests usedtest.Length(actual rented size) instead of the requested size for reads and comparisons.Changes
Read()calls to use explicit size0x1000instead oftest.Length.Take(0x1000)to compare only the requested portion of rented buffersThis aligns with
ArrayPoolcontract: rented buffers may be larger than requested and only the specified portion should be used.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.