aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/api.rs')
-rw-r--r--src/remake/api.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/remake/api.rs b/src/remake/api.rs
index f2330e7..9ccd582 100644
--- a/src/remake/api.rs
+++ b/src/remake/api.rs
@@ -1083,8 +1083,8 @@ pub(crate) mod testing {
Some(serde_json::to_value(report).expect("report"))
}
- /// One line per remake record, for test failures: phase, timing (relative to now),
- /// decision and tally.
+ /// For test failures: the catch-up, if any, and one line per remake record: phase,
+ /// timing (relative to now), decision and tally.
pub(crate) async fn describe<H: Host>(host: &H) -> Vec<String> {
let (all, register) = host
.read_doc(|doc| (records::load_all(doc), records::load_register(doc)))
@@ -1092,8 +1092,18 @@ pub(crate) mod testing {
let now = host.now_millis();
let grace = host.dormant_after().as_millis() as u64;
let relative = |at: UnixMillis| at.0 as i64 - now.0 as i64;
- all.iter()
- .map(|(id, record)| {
+ let catch_up = host.remake().catch_up().map(|catch_up| {
+ format!(
+ "catch-up: target={} attempts={} rejoining={} error={:?}",
+ catch_up.target,
+ catch_up.attempts,
+ host.remake().is_rejoining(),
+ catch_up.error,
+ )
+ });
+ catch_up
+ .into_iter()
+ .chain(all.iter().map(|(id, record)| {
let proposal = &record.proposal;
format!(
"remake {id}: phase={:?} coordinator={} from={:?} proposed_at={}ms \
@@ -1109,7 +1119,7 @@ pub(crate) mod testing {
record.abort_requested.is_some(),
record.contested,
)
- })
+ }))
.collect()
}
}