mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-11 21:22:10 +00:00
[PR #895] [MERGED] use File.OpenRead instead of File.Open in tests to allow concurrent access #1317
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/895
Author: @Morilli
Created: 2/11/2025
Status: ✅ Merged
Merged: 2/11/2025
Merged by: @adamhathcock
Base:
master← Head:fix-test-concurrency📝 Commits (1)
d560b46use File.OpenRead instead of File.Open to allow concurrent access📊 Changes
2 files changed (+8 additions, -8 deletions)
View changed files
📝
tests/SharpCompress.Test/Zip/ZipArchiveTests.cs(+5 -5)📝
tests/SharpCompress.Test/Zip/ZipReaderTests.cs(+3 -3)📄 Description
When running all tests concurrently, it could happens that multiple tests accessed the same test file at the same time.
This should not be an issue when just reading the files, however the usage of
File.Openwithout aFileShareparameter made the access exclusive and caused each subsequent call to fail. This was especially noticable in theZip_Uncompressed_64bittest due to the long time it takes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.