Conversation
This comment has been minimized.
This comment has been minimized.
|
Looks great so far! If I understand correctly Overall I'd hope that there would be more implementations of Having the option to ignore errors is still relevant for me and other users seem to agree. I fully understand that JUnit does not want to provide numerous options to not have the burden of maintaining them, still at least a curated selection should be available. |
I'd say
I agree but that can be a second step, maybe even in a later release after we've seen a few implementations.
How do you mean that?
The implementation could be as simple as that: public class ErrorIgnoringTempDirDeletionStrategy implements TempDirDeletionStrategy {
@Override
public Map<Path, Exception> delete(Path tempDir, AnnotatedElementContext elementContext,
ExtensionContext extensionContext) throws IOException {
Standard.INSTANCE.delete(tempDir, elementContext, extensionContext);
return emptyMap();
}
}Whether we want to provide this as a built-in implementation (and thus encouraging users to ignore errors), remains to be discussed. |
I was under the impression that one could already implement custom deletion behavior via
Just want to emphasize that with the default being |
|
Team decision:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDirDeletionStrategy.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/DefaultDeletionResult.java
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDirDeletionStrategy.java
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/DefaultDeletionResult.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
||
| /** | ||
| * Standard {@link TempDirDeletionStrategy} implementation that recursively | ||
| * deletes all files and directories within the temporary directory. |
There was a problem hiding this comment.
"within the temporary directory" is doing some heavy lifting here. Would it be appropriate to mention symlinks and junctions here?
✅ All tests passed ✅🏷️ Commit: d9f4867 Learn more about TestLens at testlens.app. |
mpkorstanje
left a comment
There was a problem hiding this comment.
LGTM. Pushed a few nitpicks. One question, but not too important.
Resolves #4567.
Definition of Done
@APIannotations