mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
only retry if the broadcast message task is in sending
previously we would retry if the task was queued up for retry but the status is in "received-ack" or "received-err". We don't expect that a task will be retried after getting this status, but if there are duplicate tasks that could happen. Lets plan for the worst by saying "only process a retry if the task is currently in sending". this way, if a duplicate task is on retry and the first task goes through succesfully, the duplicate task will give up.
This commit is contained in:
@@ -701,15 +701,20 @@ def test_check_provider_message_should_send_doesnt_raise_if_newer_event_not_acke
|
||||
|
||||
@pytest.mark.parametrize('existing_message_status', [
|
||||
BroadcastProviderMessageStatus.SENDING,
|
||||
BroadcastProviderMessageStatus.ACK,
|
||||
BroadcastProviderMessageStatus.ERR,
|
||||
|
||||
pytest.param(
|
||||
BroadcastProviderMessageStatus.ACK,
|
||||
marks=pytest.mark.xfail(raises=CBCProxyFatalException)
|
||||
),
|
||||
pytest.param(
|
||||
BroadcastProviderMessageStatus.ERR,
|
||||
marks=pytest.mark.xfail(raises=CBCProxyFatalException)
|
||||
),
|
||||
pytest.param(
|
||||
BroadcastProviderMessageStatus.TECHNICAL_FAILURE,
|
||||
marks=pytest.mark.xfail(raises=CBCProxyFatalException)
|
||||
),
|
||||
])
|
||||
def test_check_provider_message_should_send_doesnt_raise_if_current_event_already_has_provider_message(
|
||||
def test_check_provider_message_should_send_raises_if_current_event_already_has_provider_message_not_in_sending(
|
||||
sample_template,
|
||||
existing_message_status
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user