Skip to content

Commit

Permalink
Change Wait strategy to waitForLogMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzegorz Kołakowski committed Nov 22, 2023
1 parent cc8218e commit 2e42aa4
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.time.Duration;

import static com.getindata.flink.connector.jdbc.testutils.databases.elasticsearch.ElasticsearchMetadata.PASSWORD;
import static com.getindata.flink.connector.jdbc.testutils.databases.elasticsearch.ElasticsearchMetadata.USERNAME;


/**
Expand All @@ -40,10 +39,7 @@ public class ElasticsearchDatabase extends DatabaseExtension implements Elastics

private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchDatabase.class);
private static final ElasticsearchContainer CONTAINER = new ElasticsearchContainer(ELASTICSEARCH_8)
.waitingFor(
Wait.forHttp("/_license")
.withBasicCredentials(USERNAME, PASSWORD)
.withStartupTimeout(Duration.ofMinutes(5)))
.waitingFor(Wait.forLogMessage(".*license mode is .*", 1))
.withLogConsumer(new Slf4jLogConsumer(LOGGER));

private static ElasticsearchMetadata metadata;
Expand Down

0 comments on commit 2e42aa4

Please sign in to comment.