diff --git a/tests/run_agent/test_run_agent.py b/tests/run_agent/test_run_agent.py index 340cf49b04..e490ddd157 100644 --- a/tests/run_agent/test_run_agent.py +++ b/tests/run_agent/test_run_agent.py @@ -126,8 +126,12 @@ def test_direct_session_db_flushes_share_marker_claim(agent): self.entered = threading.Event() self.release = threading.Event() self.calls = 0 + self.token_flushes = 0 self._lock = threading.Lock() + def flush_token_counts(self): + self.token_flushes += 1 + def append_message(self, **kwargs): with self._lock: self.calls += 1 @@ -178,6 +182,7 @@ def test_direct_session_db_flushes_share_marker_claim(agent): assert not normal.is_alive() assert not direct.is_alive() assert db.rows == ["exactly once"] + assert db.token_flushes == 1 def test_malformed_memory_config_still_builds_default_store():