Skip to content

Improve cleanup in FileManager tests #2911

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
Oct 28, 2020

Conversation

lxbndr
Copy link
Contributor

@lxbndr lxbndr commented Oct 24, 2020

Most of tests in TestFileManager do cleanup of created content, but some are missing it. After several days of re-running Foundation test suite Temp folder is full of abandoned files. While it is not a big deal (this is temp folder after all), I think it is good to be tidy and do some trivial cleanup.

This change is complement to #2909

@MaxDesiatov
Copy link
Contributor

@swift-ci please test

@compnerd
Copy link
Member

Does it make sense to put these into defer blocks instead at the beginning of the function?

@lxbndr
Copy link
Contributor Author

lxbndr commented Oct 27, 2020

Does it make sense to put these into defer blocks instead at the beginning of the function?

I believe it would be better with defer. I didn't use it just because there are many similar tests with same approach. But I guess there is no reason to keep consistency with that code. Will do.

@lxbndr lxbndr force-pushed the temporary-for-real branch from 9c06b5e to ea501f4 Compare October 27, 2020 21:55
@spevans
Copy link
Contributor

spevans commented Oct 27, 2020

@swift-ci test

@compnerd compnerd merged commit 849d2b7 into swiftlang:main Oct 28, 2020
@lxbndr lxbndr deleted the temporary-for-real branch October 28, 2020 17:56
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.

4 participants