Skip to content

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

test(mcp-ui): derive eviction timestamps from one base instant

oxoxDev764d46015d5c
diff --git a/crates/openhuman-core/src/mcp/ui/cache_tests.rs b/crates/openhuman-core/src/mcp/ui/cache_tests.rs
index 5a5295781f..c7fe60762d 100644
--- a/crates/openhuman-core/src/mcp/ui/cache_tests.rs
+++ b/crates/openhuman-core/src/mcp/ui/cache_tests.rs
@@ -34,11 +34,12 @@ fn reads_are_keyed_by_server_and_uri() {
#[test]
fn eviction_drops_the_oldest_entries_at_capacity() {
let mut map: HashMap<u32, Timed<u32>> = HashMap::new();
+ let base = Instant::now();
for key in 0..MAX_ENTRIES as u32 {
map.insert(
key,
Timed {
- at: Instant::now(),
+ at: base + Duration::from_millis(u64::from(key)),
value: key,
},
);