Skip to content
Draft
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
10 changes: 7 additions & 3 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ filter = 'test(/^integration::sync::/)'
test-group = 'serial-live-mainnet'

# These tests sync mainnet to genesis from live peers; they normally finish in
# ~10-30s, but a slow/unreachable peer can stall them. Fail fast after 10m and
# retry instead of hanging near the old 30m hard limit, where they flaked.
# ~10-30s, but a slow/unreachable peer can stall them indefinitely: they pass
# `MempoolBehavior::ShouldNotActivate`, so `sync_until` collects the whole output
# with `wait_with_output`, which `TestChild::with_timeout` does not bound (see
# `zebra-test/src/command.rs`). Nextest is therefore the only limit, so keep it
# close to the runtime the tests actually need: a stalled attempt costs 2m and is
# retried, instead of holding the serial live-mainnet group for 10m.
[[profile.ci.overrides]]
filter = 'test(=integration::sync::sync_one_checkpoint_mainnet) or test(=integration::sync::restart_stop_at_height)'
slow-timeout = { period = "5m", terminate-after = 2 }
slow-timeout = { period = "60s", terminate-after = 2 }
retries = 2

[[profile.ci.overrides]]
Expand Down
6 changes: 6 additions & 0 deletions zebrad/tests/common/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ impl MempoolBehavior {
///
/// On success, returns the associated `TempDir`. Returns an error if
/// the child exits or `timeout` elapses before `stop_regex` is found.
///
/// `timeout` only bounds the mempool behaviours that check the logs as they arrive.
/// With `MempoolBehavior::ShouldNotActivate`, `zebrad` has to exit by itself so its
/// whole output can be collected, and the wait for that exit is unbounded, because
/// `TestChild::with_timeout` does not apply to `wait_with_output`. A stalled sync in
/// those tests is caught by the per-test `slow-timeout` in `.config/nextest.toml`.
#[allow(clippy::too_many_arguments)]
#[tracing::instrument(skip(reuse_tempdir))]
pub fn sync_until(
Expand Down
Loading