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

Introduce cleanup mode in @TempDir #1814

Closed
4 tasks
sbrannen opened this issue Mar 13, 2019 · 4 comments
Closed
4 tasks

Introduce cleanup mode in @TempDir #1814

sbrannen opened this issue Mar 13, 2019 · 4 comments

Comments

@sbrannen
Copy link
Member

Overview

As discussed in spring-io/initializr#862, the TempDirectory may fail to clean up the temporary directory due to various reasons, but sometimes the user would prefer that the extension not cause the test to fail if certain files or folders within the temporary directory cannot be deleted.

Introducing a configurable clean up mode would help to support such use cases.

Proposal

Proposal by @marcphilipp:

I think it should be strict by default in order to catch subtle bugs in the code under test, e.g. an unclosed stream. But changing to a lenient mode via the annotation (sth. like @TempDir(cleanupMode = LENIENT)) or a configuration parameter is certainly sth. we can consider for 5.4.1.

Deliverables

  • Introduce a means to opt out of test failure when the temporary directory cannot be cleaned up automatically.
  • Document in Javadoc.
  • Document in User Guide.
  • Document in Release Notes.
@stale
Copy link

stale bot commented May 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the status: stale label May 13, 2021
@OrangeDog
Copy link

OrangeDog commented May 14, 2021

When you have a limited bandwidth that's exactly when you don't want a stalebot, because valuable stuff will die simply because you haven't got to it yet, rather than because it's obsolete.

@stale stale bot removed the status: stale label May 14, 2021
@marcphilipp marcphilipp removed this from the 5.8 Backlog milestone Jun 19, 2021
@marcphilipp
Copy link
Member

@OrangeDog Valuable stuff will come up again even if Stalebot closes it.

@marcphilipp
Copy link
Member

Superseded by #2159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants