Skip to content

Quickly sandbox your AI agent.

Python

Share stdin registry assertions across transport tests

Tyler Payneda5520442ccc
diff --git a/packages/dev/quicksand-image-tools/quicksand_image_tools/quicksand-guest-agent/src/stdin_execution/tests.rs b/packages/dev/quicksand-image-tools/quicksand_image_tools/quicksand-guest-agent/src/stdin_execution/tests.rs
index 26dd00e..43f6525 100644
--- a/packages/dev/quicksand-image-tools/quicksand_image_tools/quicksand-guest-agent/src/stdin_execution/tests.rs
+++ b/packages/dev/quicksand-image-tools/quicksand_image_tools/quicksand-guest-agent/src/stdin_execution/tests.rs
@@ -63,8 +63,14 @@ async fn finish(mut output: mpsc::Receiver<OutputEvent>) -> (String, String, i32
}
}
+impl StdinExecutions {
+ pub(crate) fn assert_no_registrations(&self) {
+ assert!(self.entries.lock().unwrap().is_empty());
+ }
+}
+
fn assert_clean(executions: &StdinExecutions, busy: &AtomicBool) {
- assert!(executions.entries.lock().unwrap().is_empty());
+ executions.assert_no_registrations();
assert!(!busy.load(Ordering::SeqCst));
}