Search in sources :

Example 1 with EmbeddedDatabaseConnection

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

the class DataSourceHealthIndicatorTests method init.

@Before
public void init() {
    EmbeddedDatabaseConnection db = EmbeddedDatabaseConnection.HSQL;
    this.dataSource = new SingleConnectionDataSource(db.getUrl() + ";shutdown=true", "sa", "", false);
    this.dataSource.setDriverClassName(db.getDriverClassName());
}
Also used : SingleConnectionDataSource(org.springframework.jdbc.datasource.SingleConnectionDataSource) EmbeddedDatabaseConnection(org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 EmbeddedDatabaseConnection (org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection)1 SingleConnectionDataSource (org.springframework.jdbc.datasource.SingleConnectionDataSource)1