Skip to content

Commit

Permalink
[MJAVADOC-804] Remove temporary directories created by tests
Browse files Browse the repository at this point in the history
This closes #301
  • Loading branch information
pzygielo authored and michael-o committed Jul 14, 2024
1 parent 91369fa commit 4c8ca8e
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 4c8ca8e

Please sign in to comment.