Search in sources :

Example 1 with Pool

use of org.springframework.boot.autoconfigure.neo4j.Neo4jProperties.Pool in project spring-boot by spring-projects.

the class Neo4jPropertiesTests method poolSettingsHaveConsistentDefaults.

@Test
void poolSettingsHaveConsistentDefaults() {
    Config defaultConfig = Config.defaultConfig();
    Pool pool = new Neo4jProperties().getPool();
    assertThat(pool.isMetricsEnabled()).isEqualTo(defaultConfig.isMetricsEnabled());
    assertThat(pool.isLogLeakedSessions()).isEqualTo(defaultConfig.logLeakedSessions());
    assertThat(pool.getMaxConnectionPoolSize()).isEqualTo(defaultConfig.maxConnectionPoolSize());
    assertDuration(pool.getIdleTimeBeforeConnectionTest(), defaultConfig.idleTimeBeforeConnectionTest());
    assertDuration(pool.getMaxConnectionLifetime(), defaultConfig.maxConnectionLifetimeMillis());
    assertDuration(pool.getConnectionAcquisitionTimeout(), defaultConfig.connectionAcquisitionTimeoutMillis());
}
Also used : Config(org.neo4j.driver.Config) Pool(org.springframework.boot.autoconfigure.neo4j.Neo4jProperties.Pool) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 Config (org.neo4j.driver.Config)1 Pool (org.springframework.boot.autoconfigure.neo4j.Neo4jProperties.Pool)1