Minimize and centralize assumptions about build output

Closes gh-15471
This commit is contained in:
Andy Wilkinson
2018-12-14 17:50:20 +00:00
parent 7d0a7a65c8
commit 61d04db0d7
57 changed files with 778 additions and 337 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.boot.devtools.autoconfigure;
import java.io.IOException;
import java.sql.SQLException;
import java.sql.Statement;
@@ -23,7 +24,9 @@ import javax.sql.DataSource;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
@@ -40,9 +43,13 @@ import static org.mockito.Mockito.verify;
public class DevToolsPooledDataSourceAutoConfigurationTests
extends AbstractDevToolsDataSourceAutoConfigurationTests {
@Rule
public final TemporaryFolder temp = new TemporaryFolder();
@Before
public void before() {
System.setProperty("derby.stream.error.file", "target/derby.log");
public void before() throws IOException {
System.setProperty("derby.stream.error.file",
this.temp.newFile("derby.log").getAbsolutePath());
}
@After