Skip to content

Commit 6b5e7d5

Browse files
committed
Add utility method supporting the (recursive) removal of a (test) directory in IntegrationTestsSupport.
1 parent 82c9407 commit 6b5e7d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupport.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,10 @@ public static void stopGemFireLocatorWaitOnStopEvent(long duration) {
536536
return directory;
537537
}
538538

539+
protected static boolean removeRecursiveDirectory(@NonNull File directory) {
540+
return directory != null && directory.isDirectory() && FileSystemUtils.deleteRecursive(directory);
541+
}
542+
539543
protected static boolean isDeleteDirectoryOnExit() {
540544
return !System.getProperties().containsKey(DIRECTORY_DELETE_ON_EXIT_PROPERTY)
541545
|| Boolean.getBoolean(DIRECTORY_DELETE_ON_EXIT_PROPERTY);

0 commit comments

Comments
 (0)