Skip to content

Commit 1cccf77

Browse files
authored
Merge pull request #160 from dmoliveira/loopmux-br-3fk-heartbeat-contract
Add heartbeat metric output contract regression
2 parents 3d6e352 + 0f81463 commit 1cccf77

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11506,6 +11506,21 @@ runs:
1150611506
assert!(stopped.contains("activity=idle"));
1150711507
}
1150811508

11509+
#[test]
11510+
fn fleet_heartbeat_metric_contract_includes_required_keys_for_all_states() {
11511+
for state in [LoopState::Running, LoopState::Holding, LoopState::Stopped] {
11512+
let metric = format_fleet_heartbeat_metric(state, 7, 1, 5, 60);
11513+
assert!(metric.contains("fleet-heartbeat"));
11514+
assert!(metric.contains("state="));
11515+
assert!(metric.contains("activity="));
11516+
assert!(metric.contains("progress="));
11517+
assert!(metric.contains("sends_total="));
11518+
assert!(metric.contains("sends_delta="));
11519+
assert!(metric.contains("poll="));
11520+
assert!(metric.contains("window="));
11521+
}
11522+
}
11523+
1150911524
#[test]
1151011525
fn periodic_count_log_recovers_after_counter_reset() {
1151111526
assert!(!should_emit_periodic_count_log(10, 25, 25));

0 commit comments

Comments
 (0)