Files
Nexus/tests/test_agent_heartbeat_ttl.py
2026-07-08 22:31:31 +08:00

10 lines
338 B
Python

"""Agent heartbeat Redis TTL must outlive the MySQL flush interval."""
from server.api.agent import REDIS_KEY_EXPIRE
from server.background.heartbeat_flush import FLUSH_INTERVAL
def test_heartbeat_redis_ttl_exceeds_flush_interval():
assert REDIS_KEY_EXPIRE > FLUSH_INTERVAL
assert REDIS_KEY_EXPIRE == int(FLUSH_INTERVAL * 1.5)