JAVA-21187 Cleanup un-committed or un-ignored artifacts - Week 21 - 2023 (moved-5) (#14312)

Co-authored-by: timis1 <[email protected]>
This commit is contained in:
timis1
2023-06-30 09:33:31 +05:30
committed by GitHub
co-authored by timis1
parent 7047e858de
commit 8e800d1a2d
4 changed files with 67 additions and 14 deletions
@@ -5,6 +5,7 @@ import java.io.File;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -33,12 +34,18 @@ public class FileProcessorIntegrationTest {
file2.createNewFile();
}
@After
public void tearDown() {
cleanFolder(new File(SOURCE_FOLDER));
cleanFolder(new File(DESTINATION_FOLDER));
}
private void cleanFolder(File folder) {
File[] files = folder.listFiles();
if (files != null) {
for (File file : files) {
if (file.isFile()) {
file.delete();
file.deleteOnExit();
}
}
}