test(runner): acknowledge terminal result delivery

This commit is contained in:
Dotta 2026-09-03 00:01:17 -05:00
parent 5835c98675
commit 5e3a9b50d9
1 changed files with 17 additions and 0 deletions

View File

@ -2458,6 +2458,22 @@ mod tests {
);
let shutdown_result = receive_secure(&mut second, &mut second_secure, &server_config);
assert_eq!(shutdown_result["kind"], "command_result");
send_secure(
&mut second,
&mut second_secure,
&server_config,
&control(
&server_state,
"connection_2",
"command_result_ack",
json!({
"commandId": "command_shutdown",
"commandType": "runner.shutdown",
"controllerSeq": 2,
"status": "completed",
}),
),
);
});
let session_open_calls = Arc::new(AtomicUsize::new(0));
@ -2479,6 +2495,7 @@ mod tests {
let final_state: DurableState = serde_json::from_slice(&state_bytes).unwrap();
assert_eq!(final_state.acked_source_seq, 1);
assert!(final_state.outbox.is_empty());
assert!(final_state.pending_terminal_delivery.is_none());
assert_eq!(final_state.reconnect_count, 1);
std::fs::remove_dir_all(directory).unwrap();
}