persona tests: the hold-between-sessions test back on the 1 s clock

A 1 ms clock never reaches the session's idle timers (the loop guard fired); the other two new tests passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-01 17:51:32 +01:00
commit 14e7838813

View file

@ -2270,8 +2270,6 @@ fn each_session_is_lent_a_lease_that_ends_with_the_units_remaining_time() {
#[test]
fn a_hold_placed_as_a_session_ends_stops_the_next_session_before_a_lease_is_asked() {
let rig = Rig::new(vec![operator_says(1, "a"), direct(2, "!dm:chat", "@ann:chat", "later")], &[says(&[("operator", "x")]), says(&[("!dm:chat", "y")])]);
// Time barely passes, so no poll inside the session sees the hold: only the check between sessions can.
rig.clock.step.set(1);
let swarm = rig.swarm_store();
*rig.chat.on_send.borrow_mut() = Some(Box::new(move || {
SwarmWriter::open(&swarm).unwrap().set_brake(false, at(0), "op").unwrap();