Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(cua-driver): time the batch pause test on a paused clock (#6453)

injaneityd58428a14ae5
diff --git a/libs/cua-driver/rust/crates/cua-driver-core/src/batch_tools/tests.rs b/libs/cua-driver/rust/crates/cua-driver-core/src/batch_tools/tests.rs
index 140abbfa2f..55977da798 100644
--- a/libs/cua-driver/rust/crates/cua-driver-core/src/batch_tools/tests.rs
+++ b/libs/cua-driver/rust/crates/cua-driver-core/src/batch_tools/tests.rs
@@ -386,10 +386,12 @@ async fn observation_inherits_the_window_and_stays_bounded() {
);
}
-#[tokio::test]
+// The paused clock moves only when the batch sleeps, so a slow runner cannot
+// push the elapsed time past the upper bound.
+#[tokio::test(start_paused = true)]
async fn pauses_between_steps_but_not_after_the_last() {
let harness = Harness::new();
- let started = std::time::Instant::now();
+ let started = tokio::time::Instant::now();
harness
.run(json!({"delay_ms": 120, "steps": [
{"tool": "click", "args": {"pid": 42}},