Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ impl MinioContainer {
let container = GenericImage::new(MINIO_IMAGE, MINIO_TAG)
.with_exposed_port(MINIO_PORT.tcp())
.with_exposed_port(MINIO_CONSOLE_PORT.tcp())
.with_wait_for(WaitFor::message_on_stderr("API:"))
.with_wait_for(WaitFor::http(
HttpWaitStrategy::new("/minio/health/live")
.with_port(MINIO_PORT.tcp())
.with_expected_status_code(200u16),
))
.with_network(network)
.with_container_name(container_name)
.with_env_var("MINIO_ROOT_USER", MINIO_ACCESS_KEY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use integration::harness::TestBinaryError;
use reqwest_middleware::ClientWithMiddleware as HttpClient;
use reqwest_retry::RetryTransientMiddleware;
use reqwest_retry::policies::ExponentialBackoff;
use testcontainers_modules::testcontainers::core::wait::HttpWaitStrategy;
use testcontainers_modules::testcontainers::core::{IntoContainerPort, WaitFor};
use testcontainers_modules::testcontainers::runners::AsyncRunner;
use testcontainers_modules::testcontainers::{ContainerAsync, GenericImage, ImageExt};
Expand Down Expand Up @@ -101,9 +102,11 @@ impl InfluxDbContainer {
let container: ContainerAsync<GenericImage> =
GenericImage::new(INFLUXDB_IMAGE, INFLUXDB_TAG)
.with_exposed_port(INFLUXDB_PORT.tcp())
// "Listening" appears in stdout before the HTTP API is ready on
// aarch64/Apple Silicon; we add a real /ping probe below.
.with_wait_for(WaitFor::message_on_stdout("Listening"))
.with_wait_for(WaitFor::http(
HttpWaitStrategy::new("/ping")
.with_port(INFLUXDB_PORT.tcp())
.with_expected_status_code(204u16),
))
.with_mapped_port(0, INFLUXDB_PORT.tcp())
.with_env_var("DOCKER_INFLUXDB_INIT_MODE", "setup")
.with_env_var("DOCKER_INFLUXDB_INIT_USERNAME", INFLUXDB_USERNAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use reqwest_retry::policies::ExponentialBackoff;
use serde::Deserialize;
use std::collections::HashMap;
use std::time::Duration;
use testcontainers_modules::testcontainers::core::wait::HttpWaitStrategy;
use testcontainers_modules::testcontainers::core::{IntoContainerPort, WaitFor};
use testcontainers_modules::testcontainers::runners::AsyncRunner;
use testcontainers_modules::testcontainers::{ContainerAsync, GenericImage, ImageExt};
Expand All @@ -38,7 +39,6 @@ const DEFAULT_POLL_INTERVAL_MS: u64 = 50;
const QUICKWIT_IMAGE: &str = "quickwit/quickwit";
const QUICKWIT_TAG: &str = "0.8.2";
const QUICKWIT_PORT: u16 = 7280;
const QUICKWIT_READY_MSG: &str = "REST server is ready";
const QUICKWIT_LISTEN_ADDRESS: &str = "0.0.0.0";

const ENV_PLUGIN_URL: &str = "IGGY_CONNECTORS_SINK_QUICKWIT_PLUGIN_CONFIG_URL";
Expand Down Expand Up @@ -69,7 +69,11 @@ impl QuickwitContainer {

let container = GenericImage::new(QUICKWIT_IMAGE, QUICKWIT_TAG)
.with_exposed_port(0.tcp())
.with_wait_for(WaitFor::message_on_stdout(QUICKWIT_READY_MSG))
.with_wait_for(WaitFor::http(
HttpWaitStrategy::new("/health/readyz")
.with_port(QUICKWIT_PORT.tcp())
.with_expected_status_code(200u16),
))
.with_network(unique_network)
.with_cmd(["run"])
.with_env_var("QW_LISTEN_ADDRESS", QUICKWIT_LISTEN_ADDRESS)
Expand Down
Loading