change countdown from 30 to 60 seconds for message sends to better match batch insert timing

This commit is contained in:
Kenneth Kehl
2025-01-13 13:35:40 -08:00
parent eac21788a1
commit 4965bc2354
12 changed files with 29 additions and 29 deletions

View File

@@ -151,7 +151,7 @@ def test_send_notification_with_placeholders_replaced(
)
mocked.assert_called_once_with(
[notification_id], queue="send-email-tasks", countdown=30
[notification_id], queue="send-email-tasks", countdown=60
)
assert response.status_code == 201
assert response_data["body"] == "Hello Jo\nThis is an email from GOV.UK"
@@ -423,7 +423,7 @@ def test_should_allow_valid_sms_notification(notify_api, sample_template, mocker
notification_id = response_data["notification"]["id"]
mocked.assert_called_once_with(
[notification_id], queue="send-sms-tasks", countdown=30
[notification_id], queue="send-sms-tasks", countdown=60
)
assert response.status_code == 201
assert notification_id
@@ -480,7 +480,7 @@ def test_should_allow_valid_email_notification(
response_data = json.loads(response.get_data(as_text=True))["data"]
notification_id = response_data["notification"]["id"]
app.celery.provider_tasks.deliver_email.apply_async.assert_called_once_with(
[notification_id], queue="send-email-tasks", countdown=30
[notification_id], queue="send-email-tasks", countdown=60
)
assert response.status_code == 201
@@ -624,7 +624,7 @@ def test_should_send_email_if_team_api_key_and_a_service_user(
)
app.celery.provider_tasks.deliver_email.apply_async.assert_called_once_with(
[fake_uuid], queue="send-email-tasks", countdown=30
[fake_uuid], queue="send-email-tasks", countdown=60
)
assert response.status_code == 201
@@ -662,7 +662,7 @@ def test_should_send_sms_to_anyone_with_test_key(
],
)
app.celery.provider_tasks.deliver_sms.apply_async.assert_called_once_with(
[fake_uuid], queue="send-sms-tasks", countdown=30
[fake_uuid], queue="send-sms-tasks", countdown=60
)
assert response.status_code == 201
@@ -701,7 +701,7 @@ def test_should_send_email_to_anyone_with_test_key(
)
app.celery.provider_tasks.deliver_email.apply_async.assert_called_once_with(
[fake_uuid], queue="send-email-tasks", countdown=30
[fake_uuid], queue="send-email-tasks", countdown=60
)
assert response.status_code == 201
@@ -739,7 +739,7 @@ def test_should_send_sms_if_team_api_key_and_a_service_user(
)
app.celery.provider_tasks.deliver_sms.apply_async.assert_called_once_with(
[fake_uuid], queue="send-sms-tasks", countdown=30
[fake_uuid], queue="send-sms-tasks", countdown=60
)
assert response.status_code == 201
@@ -796,7 +796,7 @@ def test_should_persist_notification(
],
)
mocked.assert_called_once_with([fake_uuid], queue=queue_name, countdown=30)
mocked.assert_called_once_with([fake_uuid], queue=queue_name, countdown=60)
assert response.status_code == 201
notification = notifications_dao.get_notification_by_id(fake_uuid)
@@ -857,7 +857,7 @@ def test_should_delete_notification_and_return_error_if_redis_fails(
)
assert str(e.value) == "failed to talk to redis"
mocked.assert_called_once_with([fake_uuid], queue=queue_name, countdown=30)
mocked.assert_called_once_with([fake_uuid], queue=queue_name, countdown=60)
assert not notifications_dao.get_notification_by_id(fake_uuid)
assert not NotificationHistory.query.get(fake_uuid)
@@ -1190,7 +1190,7 @@ def test_should_allow_store_original_number_on_sms_notification(
notification_id = response_data["notification"]["id"]
mocked.assert_called_once_with(
[notification_id], queue="send-sms-tasks", countdown=30
[notification_id], queue="send-sms-tasks", countdown=60
)
assert response.status_code == 201
assert notification_id