Skip to content

[MJAVADOC-804] Remove temporary directories created by tests #301

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

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class JavadocReportTest extends AbstractMojoTestCase {

private Path unit;

private Path tempDirectory;

private File localRepo;

private static final Logger LOGGER = LoggerFactory.getLogger(JavadocReportTest.class);
Expand All @@ -91,7 +93,7 @@ public class JavadocReportTest extends AbstractMojoTestCase {
protected void setUp() throws Exception {
super.setUp();

Path tempDirectory = Files.createTempDirectory("JavadocReportTest");
tempDirectory = Files.createTempDirectory("JavadocReportTest");
localRepo = tempDirectory.resolve(Paths.get("target/local-repo/")).toFile();
unit = new File(getBasedir(), "src/test/resources/unit").toPath();

Expand All @@ -101,7 +103,7 @@ protected void setUp() throws Exception {
@Override
protected void tearDown() throws Exception {
try {
deleteDirectory(localRepo);
deleteDirectory(tempDirectory.toFile());
} catch (IOException ex) {
// CI servers can have problems deleting files.
// It will get cleared out eventually, and since
Expand Down