Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(storage): wait for other scope's blob to expire before sweep assertion

Steven Enamakel259d3d50bb09
diff --git a/crates/openhuman-core/src/storage/blob_sweep_tests.rs b/crates/openhuman-core/src/storage/blob_sweep_tests.rs
index 23c0cc691e..8b2bca8517 100644
--- a/crates/openhuman-core/src/storage/blob_sweep_tests.rs
+++ b/crates/openhuman-core/src/storage/blob_sweep_tests.rs
@@ -50,6 +50,9 @@ async fn sweep_scope_reclaims_only_lapsed_blobs_of_that_scope() {
put_expiring(&backend, &other, "short", 10).await;
wait_until_expired(&backend, &local, "short").await;
+ // The other scope's TTL starts slightly later. Wait for its own expiry
+ // before asserting that the local sweep left it available to its sweep.
+ wait_until_expired(&backend, &other, "short").await;
assert_eq!(sweep_scope(backend.as_ref(), &local).await, 1);
assert_eq!(sweep_scope(backend.as_ref(), &local).await, 0, "idempotent");
assert_eq!(