1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

File.deleteOnExit is not recursive. Replaced by DeleteFilesOnShutdown shutdown hook. Fixes #2971

This commit is contained in:
Federico Fissore
2015-04-15 10:19:39 +02:00
parent e7dc30dae4
commit 3465fcf97b
6 changed files with 64 additions and 8 deletions

View File

@ -6,6 +6,7 @@ import org.fest.swing.edt.GuiQuery;
import org.junit.After;
import org.junit.Before;
import processing.app.helpers.ArduinoFrameFixture;
import processing.app.helpers.FileUtils;
import javax.swing.*;
@ -25,7 +26,6 @@ public abstract class AbstractGUITest {
Theme.init();
Base.getPlatform().setLookAndFeel();
Base.untitledFolder = Base.createTempFolder("untitled");
Base.untitledFolder.deleteOnExit();
window = GuiActionRunner.execute(new GuiQuery<ArduinoFrameFixture>() {
@Override
@ -38,6 +38,7 @@ public abstract class AbstractGUITest {
@After
public void stopTheIDE() {
window.cleanUp();
FileUtils.recursiveDelete(Base.untitledFolder);
}
}

View File

@ -1,6 +1,8 @@
package processing.app;
import org.junit.After;
import org.junit.Before;
import processing.app.helpers.FileUtils;
public abstract class AbstractWithPreferencesTest {
@ -11,7 +13,11 @@ public abstract class AbstractWithPreferencesTest {
Theme.init();
Base.untitledFolder = Base.createTempFolder("untitled");
Base.untitledFolder.deleteOnExit();
}
@After
public void cleanup() {
FileUtils.recursiveDelete(Base.untitledFolder);
}
}