Skip to content

Commit 720946e

Browse files
committed
Update waiting strategy for elasticsearch docker container
The new strategy is more stable.
1 parent af0021b commit 720946e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/testutils/databases/elasticsearch/ElasticsearchDatabase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public class ElasticsearchDatabase extends DatabaseExtension implements Elastics
3636
private static final ElasticsearchContainer CONTAINER =
3737
new ElasticsearchContainer(ELASTICSEARCH_8)
3838
.waitingFor(
39-
Wait.forHttp("/")
39+
Wait.forHttp("/_license")
4040
.withBasicCredentials(USERNAME, PASSWORD)
41-
.withReadTimeout(Duration.ofMinutes(2)))
42-
.withStartupTimeout(Duration.ofMinutes(5));
41+
.withReadTimeout(Duration.ofSeconds(5))
42+
.withStartupTimeout(Duration.ofMinutes(5)));
4343

4444
private static ElasticsearchMetadata metadata;
4545
private static ElasticsearchRestClient client;

0 commit comments

Comments
 (0)