Skip to content

Commit

Permalink
test(sync): add some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
CHr15F0x committed Nov 25, 2024
1 parent e0af01a commit 6c4697a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/pathfinder/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,12 @@ mod tests {
};

tokio::select! {
_ = tokio::time::timeout(Duration::from_secs(10), sync.run()) => (),
_ = sync_done_watch(storage.clone(), expected_last_synced_block) => (),
result = tokio::time::timeout(Duration::from_secs(10), sync.run()) => match result {
Ok(Ok(())) => unreachable!("Sync does not exit upon success, sync_done_watch should have been triggered"),
Ok(Err(e)) => tracing::debug!(%e, "Sync failed with a fatal error"),
Err(_) => tracing::debug!("Test timed out"),
},
_ = sync_done_watch(storage.clone(), expected_last_synced_block) => tracing::debug!("Sync completion detected"),
}

assert!(error_trigger.all_errors_triggered());
Expand Down

0 comments on commit 6c4697a

Please sign in to comment.