Do better DM retry to align with stndard firmware retry (but so that we can track the acks). Closes #73.

This commit is contained in:
Jack Kingsman
2026-03-17 18:12:07 -07:00
parent d5b8f7d462
commit 020acbda02
10 changed files with 474 additions and 9 deletions
+7
View File
@@ -10,6 +10,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from meshcore import EventType
import app.services.message_send as message_send_service
from app.models import SendDirectMessageRequest
from app.radio import radio_manager
from app.repository import ContactRepository
@@ -26,6 +27,12 @@ def _reset_radio_state():
radio_manager._operation_lock = prev_lock
@pytest.fixture(autouse=True)
def _disable_background_dm_retries(monkeypatch):
monkeypatch.setattr(message_send_service, "DM_SEND_MAX_ATTEMPTS", 1)
yield
def _make_mc(name="TestNode"):
mc = MagicMock()
mc.self_info = {"name": name}