test(telegram): run the ingress admission case for the full stall threshold

Fold of gate finding (2c Medium regression): raising _INGRESS_DISPATCH_STALL_HEARTBEATS to 4
left the `ingress` row of test_only_pre_handoff_failure_reopens_admission looping 3 heartbeats,
which can never reach the threshold, so its "no healthy-but-deaf report" assertion was disarmed.
Loop the threshold itself so the leg tracks future bumps. Verified: with update_admission's
dispatch counting removed, the heartbeat leg now fails (it passed with range(3)).
This commit is contained in:
kshitijk4poor
2026-10-03 16:03:04 +05:30
committed by kshitij
parent e2501d72ef
commit bb5b4f4ca6

View File

@@ -20,6 +20,7 @@ from telegram.request import BaseRequest
from gateway.config import PlatformConfig
from gateway.platforms.event import MessageType
from plugins.platforms.telegram import adapter as tg_adapter
from plugins.platforms.telegram.adapter import TelegramAdapter
@@ -508,7 +509,7 @@ async def test_only_pre_handoff_failure_reopens_admission(monkeypatch, tmp_path,
await app.process_update(update(app.bot))
assert not adapter._seen_update_ids and not adapter._inflight_update_ids
assert adapter._updates_dispatched_total == 2
for _ in range(3):
for _ in range(tg_adapter._INGRESS_DISPATCH_STALL_HEARTBEATS):
adapter._check_ingress_dispatch_stall()
assert not any("healthy but deaf" in record.message for record in caplog.records)
return