"""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)
