Skip to content

Commit fc4c1c0

Browse files
committed
fix: start with wait for health-check resolving to early when using colima on macos #997
1 parent 4471f40 commit fc4c1c0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/modules/cassandra/src/cassandra-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class CassandraContainer extends GenericContainer {
1010

1111
constructor(image = "cassandra:5.0.2") {
1212
super(image);
13-
this.withExposedPorts(CASSANDRA_PORT).withWaitStrategy(Wait.forHealthCheck()).withStartupTimeout(120_000);
13+
this.withExposedPorts(CASSANDRA_PORT).withWaitStrategy(Wait.forAll([Wait.forHealthCheck(), Wait.forListeningPorts()])).withStartupTimeout(120_000);
1414
}
1515

1616
public withDatacenter(dc: string): this {

packages/modules/cockroachdb/src/cockroachdb-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class CockroachDbContainer extends GenericContainer {
1111
super(image);
1212
this.withExposedPorts(COCKROACH_PORT, COCKROACH_HTTP_PORT)
1313
.withCommand(["start-single-node", "--insecure", `--http-addr=0.0.0.0:${COCKROACH_HTTP_PORT}`])
14-
.withWaitStrategy(Wait.forHealthCheck());
14+
.withWaitStrategy(Wait.forAll([Wait.forHealthCheck(), Wait.forListeningPorts()]));
1515
}
1616

1717
public withDatabase(database: string): this {

packages/modules/postgresql/src/postgresql-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class PostgreSqlContainer extends GenericContainer {
1010
constructor(image = "postgres:13.3-alpine") {
1111
super(image);
1212
this.withExposedPorts(POSTGRES_PORT);
13-
this.withWaitStrategy(Wait.forHealthCheck());
13+
this.withWaitStrategy(Wait.forAll([Wait.forHealthCheck(), Wait.forListeningPorts()]));
1414
this.withStartupTimeout(120_000);
1515
}
1616

0 commit comments

Comments
 (0)