diff --git a/.config/nextest.toml b/.config/nextest.toml index 11d1a92cc3e9..a18eadce8bfe 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -41,3 +41,11 @@ slow-timeout = { period = "120s", terminate-after = 3 } filter = 'test(rpc_snapshot_test_)' slow-timeout = { period = "120s", terminate-after = 3 } retries = { backoff = "exponential", count = 3, delay = "5s", jitter = true } + +# These tests download test snapshots from the network, which can take a while. +# There might be some network issues, so we allow some retries with backoff. +# Jitter is enabled to avoid [thundering herd issues](https://en.wikipedia.org/wiki/Thundering_herd_problem). +[[profile.default.overrides]] +filter = 'test(state_compute_)' +slow-timeout = { period = "120s", terminate-after = 3 } +retries = { backoff = "exponential", count = 3, delay = "5s", jitter = true } diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b70846daef32..75997a3a3e92 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -33,6 +33,7 @@ env: CXX: sccache clang++ # To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld" + RUST_LOG: error jobs: codecov: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 84511234a1a9..6747954702e8 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -31,6 +31,7 @@ env: RUSTC_WRAPPER: "sccache" CC: "sccache clang" CXX: "sccache clang++" + RUST_LOG: error jobs: tests-release: diff --git a/src/chain_sync/chain_follower.rs b/src/chain_sync/chain_follower.rs index 447740c5aacd..be1ba6562c4e 100644 --- a/src/chain_sync/chain_follower.rs +++ b/src/chain_sync/chain_follower.rs @@ -884,13 +884,18 @@ mod tests { use num_bigint::BigInt; use num_traits::ToPrimitive; use std::sync::Arc; + use tracing::level_filters::LevelFilter; + use tracing_subscriber::EnvFilter; fn setup() -> (Arc>, Chain4U>) { // Initialize test logger let _ = tracing_subscriber::fmt() + .without_time() .with_env_filter( - tracing_subscriber::EnvFilter::from_default_env() - .add_directive(tracing::Level::DEBUG.into()), + EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env() + .unwrap(), ) .try_init(); diff --git a/tests/lint.rs b/tests/lint.rs index d4779dbdf665..9b38540720df 100644 --- a/tests/lint.rs +++ b/tests/lint.rs @@ -45,13 +45,18 @@ use lints::{Lint, Violation}; use proc_macro2::{LineColumn, Span}; use syn::visit::Visit; use tracing::{debug, info, level_filters::LevelFilter}; -use tracing_subscriber::util::SubscriberInitExt as _; +use tracing_subscriber::{EnvFilter, util::SubscriberInitExt as _}; #[test] fn lint() { let _guard = tracing_subscriber::fmt() .without_time() - .with_max_level(LevelFilter::DEBUG) + .with_env_filter( + EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env() + .unwrap(), + ) .set_default(); LintRunner::new() .run::()