tests: the cap and the lanes are followed each on their own

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-03 15:17:26 +01:00
commit 8ae66796ff

View file

@ -556,14 +556,12 @@ async fn a_following_open_takes_new_limits_and_keeps_the_spend() {
assert_eq!(inner.calls(), 2);
drop(lowered);
// Either limit alone changing is followed too: the cap with the same lanes, the lanes with the same cap.
let lane = |wave: u64, elaboration: u64| LaneTokens { wave, elaboration };
let other = |cap: u64, lanes: LaneTokens| {
RecordingInferencePort::open_following(inner.clone(), store.clone(), run.clone(), cap, lanes, &start())
};
drop(other(bound * 3, lane(bound / 2, bound / 2)).unwrap());
drop(other(bound * 3, lane(bound, bound)).unwrap());
drop(other(bound * 3, lane(bound, bound)).unwrap());
assert_eq!(other(bound * 3, lane(bound, bound)).unwrap().cap(), bound * 3);
drop(other(bound * 3, lanes(bound / 2)).unwrap());
drop(other(bound * 3, lanes(bound)).unwrap());
assert_eq!(other(bound * 3, lanes(bound)).unwrap().cap(), bound * 3);
drop(other(bound / 2, lanes(bound / 2)).unwrap());
// The limits the ledger now holds are the followed ones: a plain open of them is accepted.
drop(open(bound / 2, false).unwrap());