give the databases longer to start

This commit is contained in:
Bryan Stitt 2023-07-21 23:22:43 -07:00
parent 191c0c756f
commit 7c4de5ea8b
3 changed files with 7 additions and 8 deletions

View File

@ -59,7 +59,6 @@ RUN --mount=type=cache,target=/root/.cargo/git \
\
cargo binstall -y sccache
# TODO: full path
ENV RUSTC_WRAPPER "/root/.cargo/bin/sccache"
# nextest runs tests in parallel (done its in own FROM so that it can run in parallel)

View File

@ -146,10 +146,10 @@ impl TestInflux {
};
let start = Instant::now();
let max_wait = Duration::from_secs(5);
let max_wait = Duration::from_secs(30);
loop {
if start.elapsed() > max_wait {
panic!("db took too long to start");
panic!("influx took too long to start");
}
if TcpStream::connect(format!("{}:{}", influx_ip, influx_port))
@ -167,7 +167,7 @@ impl TestInflux {
// TODO: try to use the influx client
info!(?test_influx, elapsed=%start.elapsed().as_secs_f32(), "influx post is open. Migrating now...");
info!(?test_influx, elapsed=%start.elapsed().as_secs_f32(), "influx port is open");
test_influx
}

View File

@ -115,10 +115,10 @@ impl TestMysql {
test_mysql.url = Some(db_url.clone());
let start = Instant::now();
let max_wait = Duration::from_secs(30);
let max_wait = Duration::from_secs(60);
loop {
if start.elapsed() > max_wait {
panic!("db took too long to start");
panic!("db container took too long to start");
}
if TcpStream::connect(format!("{}:{}", mysql_ip, mysql_port))
@ -139,10 +139,10 @@ impl TestMysql {
// try to migrate
let start = Instant::now();
let max_wait = Duration::from_secs(30);
let max_wait = Duration::from_secs(60);
loop {
if start.elapsed() > max_wait {
panic!("db took too long to start");
panic!("db took too long to migrate");
}
match get_migrated_db(db_url.clone(), 1, 1).await {