bbc / sqs-consumer

Build Amazon Simple Queue Service (SQS) based applications without the boilerplate
https://bbc.github.io/sqs-consumer/
Other
1.71k stars 330 forks source link

fix: gracefully handle errors in the e2e tests #365

Closed nicholasgriffintn closed 1 year ago

nicholasgriffintn commented 1 year ago

Resolves NA

Description:

Made changes to the Cucumber config to fix how it responds to an error from SQS so that it is gracefully handled

Type of change:

Why is this change required?:

When an error occurs in the E2E tests, the Consumer was not correctly stopped and so it was still listening for messages, this causes subsequent tests to fail as the previous run is handling messages instead of the new run.

Alongside this, Cucumber was not exiting after an error, which caused it to run indefinitely.

Code changes:


Checklist:

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit 0e1b1391 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 94.3% (0.0% change).

View more on Code Climate.