pub struct SlowMockJudge { /* private fields */ }Expand description
A JudgeClient test double that sleeps before returning a passing verdict.
Intended for exercising the evaluator-side outer tokio::time::timeout
(FR-010 / FR-014). Pair with
SemanticToolSelectionEvaluator::with_timeout
or the equivalent on the tool-parameter evaluator to drive the outer
deadline path.
ⓘ
use std::{sync::Arc, time::Duration};
use swink_agent_eval::{SemanticToolSelectionEvaluator, testing::SlowMockJudge};
let judge = Arc::new(SlowMockJudge::new(Duration::from_secs(10)));
let eval = SemanticToolSelectionEvaluator::new(judge)
.with_timeout(Duration::from_millis(50));
// `eval.evaluate(...)` will hit the outer timeout without hanging.Implementations§
Trait Implementations§
Source§impl JudgeClient for SlowMockJudge
impl JudgeClient for SlowMockJudge
Auto Trait Implementations§
impl Freeze for SlowMockJudge
impl RefUnwindSafe for SlowMockJudge
impl Send for SlowMockJudge
impl Sync for SlowMockJudge
impl Unpin for SlowMockJudge
impl UnsafeUnpin for SlowMockJudge
impl UnwindSafe for SlowMockJudge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more