Search in sources :

Example 1 with EmbeddedDatabaseConnection

use of org.springframework.boot.jdbc.EmbeddedDatabaseConnection in project spring-boot by spring-projects.

the class DataSourceHealthIndicatorTests method init.

@BeforeEach
void init() {
    EmbeddedDatabaseConnection db = EmbeddedDatabaseConnection.HSQLDB;
    this.dataSource = new SingleConnectionDataSource(db.getUrl("testdb") + ";shutdown=true", "sa", "", false);
    this.dataSource.setDriverClassName(db.getDriverClassName());
}
Also used : SingleConnectionDataSource(org.springframework.jdbc.datasource.SingleConnectionDataSource) EmbeddedDatabaseConnection(org.springframework.boot.jdbc.EmbeddedDatabaseConnection) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)1 EmbeddedDatabaseConnection (org.springframework.boot.jdbc.EmbeddedDatabaseConnection)1 SingleConnectionDataSource (org.springframework.jdbc.datasource.SingleConnectionDataSource)1