Connector renewal test: build the prepared invocation directly
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1b178d2d43
commit
efed95d694
1 changed files with 2 additions and 5 deletions
|
|
@ -7561,11 +7561,8 @@ mod tests {
|
|||
#[test]
|
||||
fn a_stale_invocation_is_renewed_and_a_live_one_is_sent_as_it_is() {
|
||||
let skew = REQUEST_EXPIRY.as_millis() as u64;
|
||||
let prepared = persona_request(CommandId::new(), "claude-haiku-5-5", "Speak.".into())
|
||||
.and_then(|request| {
|
||||
PreparedInference::prepare("runtime", 1_000_000 + skew, request).map_err(|_| unreachable!())
|
||||
})
|
||||
.unwrap();
|
||||
let request = persona_request(CommandId::new(), "claude-haiku-5-5", "Speak.".into()).unwrap();
|
||||
let prepared = PreparedInference::prepare("runtime", 1_000_000 + skew, request).unwrap();
|
||||
let live = prepared.invocation.clone();
|
||||
let sent = renewed_invocation(live.clone(), 1_000_000).unwrap();
|
||||
assert_eq!(sent, live, "a live invocation replays by its own id");
|
||||
|
|
|
|||
Loading…
Reference in a new issue