Skip to content

Commit f4720a0

Browse files
committed
fix startup postgresql
1 parent 23cec41 commit f4720a0

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@
1818
import org.testcontainers.containers.PostgreSQLContainer;
1919
import org.testcontainers.containers.ToxiproxyContainer;
2020
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
21-
import org.testcontainers.containers.wait.strategy.ShellStrategy;
2221
import org.testcontainers.containers.wait.strategy.WaitStrategy;
2322

24-
import java.time.Duration;
25-
import java.time.temporal.ChronoUnit;
2623
import java.util.LinkedHashMap;
2724
import java.util.Map;
2825
import java.util.Optional;
2926

3027
import static com.playtika.testcontainer.common.utils.ContainerUtils.configureCommonsAndStart;
3128
import static com.playtika.testcontainer.postgresql.PostgreSQLProperties.BEAN_NAME_EMBEDDED_POSTGRESQL;
32-
import static java.lang.String.format;
3329

3430
@Slf4j
3531
@Configuration
@@ -75,10 +71,6 @@ public PostgreSQLContainer postgresql(ConfigurableEnvironment environment,
7571

7672
network.ifPresent(postgresql::withNetwork);
7773

78-
postgresql.waitingFor(new ShellStrategy()
79-
.withCommand(format("pg_isready -U %s -d %s", properties.getUser(), properties.getDatabase()))
80-
.withStartupTimeout(Duration.of(60, ChronoUnit.SECONDS)));
81-
8274
String startupLogCheckRegex = properties.getStartupLogCheckRegex();
8375
if (StringUtils.hasLength(startupLogCheckRegex)) {
8476
WaitStrategy waitStrategy = new LogMessageWaitStrategy()

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
107107
<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
108108
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
109-
<gitflow-incremental-builder.version>4.5.3</gitflow-incremental-builder.version>
109+
<gitflow-incremental-builder.version>4.5.1</gitflow-incremental-builder.version>
110110
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
111111

112112
<!-- GPG -->

0 commit comments

Comments
 (0)