File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
modules/clickhouse/src/main/java/org/testcontainers/clickhouse Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11package org .testcontainers .clickhouse ;
22
33import org .testcontainers .containers .JdbcDatabaseContainer ;
4- import org .testcontainers .containers .wait .strategy .HttpWaitStrategy ;
4+ import org .testcontainers .containers .wait .strategy .Wait ;
55import org .testcontainers .utility .DockerImageName ;
66
77import java .time .Duration ;
@@ -56,11 +56,14 @@ public ClickHouseContainer(final DockerImageName dockerImageName) {
5656 dockerImageName .assertCompatibleWith (CLICKHOUSE_IMAGE_NAME );
5757
5858 addExposedPorts (HTTP_PORT , NATIVE_PORT );
59- this .waitStrategy =
60- new HttpWaitStrategy ()
59+ waitingFor (
60+ Wait
61+ .forHttp ("/" )
62+ .forPort (HTTP_PORT )
6163 .forStatusCode (200 )
6264 .forResponsePredicate ("Ok." ::equals )
63- .withStartupTimeout (Duration .ofMinutes (1 ));
65+ .withStartupTimeout (Duration .ofMinutes (1 ))
66+ );
6467 }
6568
6669 @ Override
@@ -130,4 +133,9 @@ public ClickHouseContainer withDatabaseName(String databaseName) {
130133 this .databaseName = databaseName ;
131134 return this ;
132135 }
136+
137+ @ Override
138+ protected void waitUntilContainerStarted () {
139+ getWaitStrategy ().waitUntilReady (this );
140+ }
133141}
You can’t perform that action at this time.
0 commit comments