use of com.palantir.docker.compose.connection.DockerPort in project atlasdb by palantir.
the class HikariCpConnectionManagerTest method createConnectionConfig.
private static ConnectionConfig createConnectionConfig(int maxConnections) {
DockerPort port = docker.containers().container("postgres").port(POSTGRES_PORT_NUMBER);
InetSocketAddress postgresAddress = new InetSocketAddress(port.getIp(), port.getExternalPort());
return ImmutablePostgresConnectionConfig.builder().dbName("atlas").dbLogin("palantir").dbPassword(ImmutableMaskedValue.of("palantir")).host(postgresAddress.getHostName()).port(postgresAddress.getPort()).maxConnections(maxConnections).checkoutTimeout(2000).build();
}
use of com.palantir.docker.compose.connection.DockerPort in project atlasdb by palantir.
the class MultiCassandraUtils method waitForCassandraContainer.
private static void waitForCassandraContainer(Container container) {
DockerPort containerPort = new DockerPort(container.getContainerName(), CASSANDRA_PORT, CASSANDRA_PORT);
Awaitility.await().atMost(60, TimeUnit.SECONDS).until(containerPort::isListeningNow);
}
use of com.palantir.docker.compose.connection.DockerPort in project atlasdb by palantir.
the class StartupIndependenceUtils method killCassandraNodes.
public static void killCassandraNodes(List<String> nodes) throws InterruptedException {
runOnCassandraNodes(nodes, MultiCassandraUtils::killCassandraContainer);
nodes.forEach(node -> {
DockerPort containerPort = new DockerPort(node, CASSANDRA_PORT, CASSANDRA_PORT);
assertSatisfiedWithin(10, () -> !containerPort.isListeningNow());
});
}
use of com.palantir.docker.compose.connection.DockerPort in project kafka-connect-cdc-mssql by jcustenborder.
the class MsSqlSettingsExtension method handleResolve.
@Override
protected Object handleResolve(ParameterContext parameterContext, ExtensionContext extensionContext, Annotation annotation, DockerComposeRule docker) throws ParameterResolutionException {
Container container = docker.containers().container(MsSqlTestConstants.CONTAINER_NAME);
DockerPort dockerPort = container.port(MsSqlTestConstants.PORT);
return MsSqlTestConstants.settings(dockerPort.getIp(), dockerPort.getExternalPort());
}
use of com.palantir.docker.compose.connection.DockerPort in project atlasdb by palantir.
the class DbkvsPostgresTestSuite method getKvsConfig.
public static DbKeyValueServiceConfig getKvsConfig() {
DockerPort port = docker.containers().container("postgres").port(POSTGRES_PORT_NUMBER);
InetSocketAddress postgresAddress = new InetSocketAddress(port.getIp(), port.getExternalPort());
ConnectionConfig connectionConfig = ImmutablePostgresConnectionConfig.builder().dbName("atlas").dbLogin("palantir").dbPassword(ImmutableMaskedValue.of("palantir")).host(postgresAddress.getHostName()).port(postgresAddress.getPort()).build();
return ImmutableDbKeyValueServiceConfig.builder().connection(connectionConfig).ddl(ImmutablePostgresDdlConfig.builder().compactInterval(HumanReadableDuration.days(2)).build()).build();
}
Aggregations