give the databases longer to start
This commit is contained in:
parent
191c0c756f
commit
7c4de5ea8b
@ -59,7 +59,6 @@ RUN --mount=type=cache,target=/root/.cargo/git \
|
|||||||
\
|
\
|
||||||
cargo binstall -y sccache
|
cargo binstall -y sccache
|
||||||
|
|
||||||
# TODO: full path
|
|
||||||
ENV RUSTC_WRAPPER "/root/.cargo/bin/sccache"
|
ENV RUSTC_WRAPPER "/root/.cargo/bin/sccache"
|
||||||
|
|
||||||
# nextest runs tests in parallel (done its in own FROM so that it can run in parallel)
|
# nextest runs tests in parallel (done its in own FROM so that it can run in parallel)
|
||||||
|
@ -146,10 +146,10 @@ impl TestInflux {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
let max_wait = Duration::from_secs(5);
|
let max_wait = Duration::from_secs(30);
|
||||||
loop {
|
loop {
|
||||||
if start.elapsed() > max_wait {
|
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))
|
if TcpStream::connect(format!("{}:{}", influx_ip, influx_port))
|
||||||
@ -167,7 +167,7 @@ impl TestInflux {
|
|||||||
|
|
||||||
// TODO: try to use the influx client
|
// 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
|
test_influx
|
||||||
}
|
}
|
||||||
|
@ -115,10 +115,10 @@ impl TestMysql {
|
|||||||
test_mysql.url = Some(db_url.clone());
|
test_mysql.url = Some(db_url.clone());
|
||||||
|
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
let max_wait = Duration::from_secs(30);
|
let max_wait = Duration::from_secs(60);
|
||||||
loop {
|
loop {
|
||||||
if start.elapsed() > max_wait {
|
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))
|
if TcpStream::connect(format!("{}:{}", mysql_ip, mysql_port))
|
||||||
@ -139,10 +139,10 @@ impl TestMysql {
|
|||||||
|
|
||||||
// try to migrate
|
// try to migrate
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
let max_wait = Duration::from_secs(30);
|
let max_wait = Duration::from_secs(60);
|
||||||
loop {
|
loop {
|
||||||
if start.elapsed() > max_wait {
|
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 {
|
match get_migrated_db(db_url.clone(), 1, 1).await {
|
||||||
|
Loading…
Reference in New Issue
Block a user