Skip to content

Commit 331abcc

Browse files
authored
fix: ready condition in ClickHouse (#441)
The ClickHouse dockerfile exposes several ports (8123, 9000, etc.). If no port is specified in the `ready_conditions` the first exposed one is chosen, which is non-deterministic. This means Clickhouse would fail to start (from the testcontainer's point of view). This PR explicitly adds the good port to the `ready_conditions` to fix that.
1 parent b60329c commit 331abcc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/clickhouse/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ impl Image for ClickHouse {
4646

4747
fn ready_conditions(&self) -> Vec<WaitFor> {
4848
vec![WaitFor::http(
49-
HttpWaitStrategy::new("/").with_expected_status_code(200_u16),
49+
HttpWaitStrategy::new("/")
50+
.with_port(CLICKHOUSE_PORT)
51+
.with_expected_status_code(200_u16),
5052
)]
5153
}
5254

0 commit comments

Comments
 (0)