Attempt to fix failing log tests

This commit is contained in:
Phillip Webb 2015-06-26 16:31:04 -07:00
parent b68382f3ba
commit a36d1e2eed
1 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,8 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.springframework.util.StringUtils;
import static org.junit.Assert.assertTrue;
/**
* Base for {@link LoggingSystem} tests.
*
@ -51,7 +53,14 @@ public abstract class AbstractLoggingSystemTests {
@Before
public void deleteTempLog() {
new File(tmpDir() + "/spring.log").delete();
deleteFile(new File(tmpDir() + "/spring.log"));
deleteFile(new File(tmpDir() + "/tmp.log"));
}
private void deleteFile(File file) {
if (file.exists()) {
assertTrue("Unable to delete file", file.delete());
}
}
@After