Skip to content

Commit 0475b5d

Browse files
author
Michael Brewer
committed
tests(batch): Add failing test for warm starts
1 parent ebfae28 commit 0475b5d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/functional/test_utilities_batch.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,16 @@ def test_batch_processor_error_when_entire_batch_fails(sqs_event_factory, record
895895
def lambda_handler(event, context):
896896
return processor.response()
897897

898-
# WHEN/THEN
898+
# WHEN calling `lambda_handler` in cold start
899899
with pytest.raises(BatchProcessingError) as e:
900900
lambda_handler(event, {})
901-
ret = str(e)
902-
assert ret is not None
901+
902+
# THEN raise BatchProcessingError
903+
assert "All records failed processing. " in str(e.value)
904+
905+
# WHEN calling `lambda_handler` in warm start
906+
with pytest.raises(BatchProcessingError) as e:
907+
lambda_handler(event, {})
908+
909+
# THEN raise BatchProcessingError
910+
assert "All records failed processing. " in str(e.value)

0 commit comments

Comments
 (0)