Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix: relax flaky entity boost parallelism timing threshold (#5511)

Kartik06d33f6cc412
diff --git a/tests/memory/test_main.py b/tests/memory/test_main.py
index 677e7fe4c..6e3e75064 100644
--- a/tests/memory/test_main.py
+++ b/tests/memory/test_main.py
@@ -828,7 +828,7 @@ class TestEntityBoostParallelism:
boosts = mock_memory._compute_entity_boosts(entities, {"user_id": "u1"})
elapsed = time.perf_counter() - start
- assert elapsed < 0.6, f"searches did not run concurrently (took {elapsed:.2f}s)"
+ assert elapsed < 0.75, f"searches did not run concurrently (took {elapsed:.2f}s)"
assert concurrent_count["peak"] >= 2, "no overlap observed between entity searches"
assert len(boosts) == 4
@@ -854,6 +854,6 @@ class TestEntityBoostParallelism:
boosts = await mock_async_memory._compute_entity_boosts_async(entities, {"user_id": "u1"})
elapsed = time.perf_counter() - start
- assert elapsed < 0.6, f"searches did not run concurrently (took {elapsed:.2f}s)"
+ assert elapsed < 0.75, f"searches did not run concurrently (took {elapsed:.2f}s)"
assert concurrent_count["peak"] >= 2, "no overlap observed between entity searches"
assert len(boosts) == 4