Configure Derby to write its log in the target directory
This commit is contained in:
parent
9deda71fd8
commit
73b114860c
|
|
@ -21,6 +21,8 @@ import java.sql.Statement;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
|
@ -37,6 +39,16 @@ import static org.mockito.Mockito.verify;
|
|||
public class DevToolsPooledDataSourceAutoConfigurationTests
|
||||
extends AbstractDevToolsDataSourceAutoConfigurationTests {
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
System.setProperty("derby.stream.error.file", "target/derby.log");
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
System.clearProperty("derby.stream.error.file");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autoConfiguredInMemoryDataSourceIsShutdown() throws SQLException {
|
||||
ConfigurableApplicationContext context = createContext(
|
||||
|
|
|
|||
Loading…
Reference in New Issue