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

fix: Cleanup temporary files generated in tests automatically #2823

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Aug 8, 2023

As I mentioned at #2822, temporary files generated in tests are not deleted automatically.
To fix this issue, this PR introduces tempfile crate.
https://docs.rs/tempfile/latest/tempfile/index.html

A temporary directory created using tempfile crate and files in the temporary directory will be automatically deleted when the corresponding TempDir object is dropped.

This PR affects the tests in bin/oli and confirmed all the tests passed with cargo test --tests --package oli

Copy link
Member

@PsiACE PsiACE left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo Xuanwo merged commit 24e52b2 into apache:main Aug 9, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants