@@ -416,16 +416,9 @@ def test_fail_no_org_slug_when_saas_to_saas(
416
416
assert not RelocationFile .objects .filter (relocation = self .relocation ).exists ()
417
417
418
418
# -1 minutes guarantees a timeout, even during synchronous execution.
419
- @patch ("sentry.relocation.tasks.process.CROSS_REGION_EXPORT_TIMEOUT" , timedelta (minutes = 0 ))
420
- @patch (
421
- "sentry.relocation.services.relocation_export.service.control_relocation_export_service.request_new_export"
422
- )
419
+ @patch ("sentry.relocation.tasks.process.CROSS_REGION_EXPORT_TIMEOUT" , timedelta (minutes = - 1 ))
423
420
def test_fail_due_to_timeout (
424
- self ,
425
- mock_export_service : Mock ,
426
- uploading_complete_mock : Mock ,
427
- fake_message_builder : Mock ,
428
- fake_kms_client : Mock ,
421
+ self , uploading_complete_mock : Mock , fake_message_builder : Mock , fake_kms_client : Mock
429
422
):
430
423
self .mock_message_builder (fake_message_builder )
431
424
self .mock_kms_client (fake_kms_client )
@@ -448,7 +441,7 @@ def test_fail_due_to_timeout(
448
441
assert relocation .status == Relocation .Status .FAILURE .value
449
442
assert relocation .latest_notified == Relocation .EmailKind .FAILED .value
450
443
assert relocation .failure_reason == ERR_UPLOADING_CROSS_REGION_TIMEOUT .substitute (
451
- delta = timedelta (minutes = 0 )
444
+ delta = timedelta (minutes = - 1 )
452
445
)
453
446
assert fake_message_builder .call_count == 1
454
447
assert fake_message_builder .call_args .kwargs ["type" ] == "relocation.failed"
@@ -459,9 +452,6 @@ def test_fail_due_to_timeout(
459
452
assert fake_kms_client .return_value .get_public_key .call_count == 1
460
453
assert fake_kms_client .return_value .asymmetric_decrypt .call_count == 0
461
454
462
- # Verify that the export service was called but didn't complete successfully
463
- assert mock_export_service .call_count == 1
464
-
465
455
assert not RelocationFile .objects .filter (relocation = self .relocation ).exists ()
466
456
467
457
0 commit comments