Skip to content
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

use File.OpenRead instead of File.Open in tests to allow concurrent access #895

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

Morilli
Copy link
Contributor

@Morilli Morilli commented Feb 11, 2025

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.Open without a FileShare parameter made the access exclusive and caused each subsequent call to fail. This was especially noticable in the Zip_Uncompressed_64bit test due to the long time it takes.

Copy link
Owner

@adamhathcock adamhathcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I didn't clock this.

@adamhathcock adamhathcock merged commit 96b34ae into adamhathcock:master Feb 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants