From 7c4de5ea8b8035863f4866b62d24146f0cb2c7be Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 21 Jul 2023 23:22:43 -0700 Subject: [PATCH] give the databases longer to start --- Dockerfile | 1 - web3_proxy/tests/common/influx.rs | 6 +++--- web3_proxy/tests/common/mysql.rs | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b2b2a12..8a357f55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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) diff --git a/web3_proxy/tests/common/influx.rs b/web3_proxy/tests/common/influx.rs index 4c052ab9..75921f8a 100644 --- a/web3_proxy/tests/common/influx.rs +++ b/web3_proxy/tests/common/influx.rs @@ -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 } diff --git a/web3_proxy/tests/common/mysql.rs b/web3_proxy/tests/common/mysql.rs index fa7c744b..36ac0e05 100644 --- a/web3_proxy/tests/common/mysql.rs +++ b/web3_proxy/tests/common/mysql.rs @@ -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 {