Skip to content

Retry writing file contents in tests on Windows #1966

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

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Feb 5, 2025

Sometimes file writes fail on Windows because another process (like sourcekitd or clangd) still has exclusive access to the file but releases it soon after. Retry to save the file if this happens. This matches what a user would do.

This should fix some test flakiness on Windows.

Sometimes file writes fail on Windows because another process (like sourcekitd or clangd) still has exclusive access to the file but releases it soon after. Retry to save the file if this happens. This matches what a user would do.
@ahoppen
Copy link
Member Author

ahoppen commented Feb 5, 2025

@swift-ci Please test

@ahoppen ahoppen merged commit 528c7ef into swiftlang:main Feb 5, 2025
3 checks passed
@ahoppen ahoppen deleted the ahoppen/retry-file-write branch February 5, 2025 18:09
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