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:
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user