Search in sources :

Example 1 with IoConfig

use of com.couchbase.client.core.env.IoConfig in project spring-boot by spring-projects.

the class CouchbaseAutoConfigurationTests method customizeEnvIo.

@Test
void customizeEnvIo() {
    testClusterEnvironment((env) -> {
        IoConfig ioConfig = env.ioConfig();
        assertThat(ioConfig.numKvConnections()).isEqualTo(2);
        assertThat(ioConfig.maxHttpConnections()).isEqualTo(5);
        assertThat(ioConfig.idleHttpConnectionTimeout()).isEqualTo(Duration.ofSeconds(3));
    }, "spring.couchbase.env.io.min-endpoints=2", "spring.couchbase.env.io.max-endpoints=5", "spring.couchbase.env.io.idle-http-connection-timeout=3s");
}
Also used : IoConfig(com.couchbase.client.core.env.IoConfig) Test(org.junit.jupiter.api.Test)

Aggregations

IoConfig (com.couchbase.client.core.env.IoConfig)1 Test (org.junit.jupiter.api.Test)1