Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQS: Fixes #2091 queue_delete() method doesn't actually delete the qu…
…eue (#2099) * SQS: wrap logic to resolve queue URL into a reusable method * Create new `_resolve_queue_url` method for reusability. `_new_queue` method retrieves the queue URL from cache or fetches it from SQS, updating the cache if necessary. `_delete` method needs to resolve the queue URL in order to delete the queue from SQS (next commit). Both methods will be able to reuse the same functionality by calling the `_resolve_queue_url` method. * Introduce DoesNotExistQueueException for easier error handling. `_new_queue` method is responsible for creating a new queue when it doesn't exist, utilizing the new exception for clarity. * Unit test coverage for `_resolve_queue_url` method. * SQS: Fix missing queue deletion in Channel._delete * Add call to `delete_queue` using sqs client. `_delete` method is expected to delete the specified queue when called. Previously, this functionality was missing, which has now been corrected. The method raises a `DoesNotExistQueueException` if the specified queue name doesn’t exist. * Update unit tests with new assertion and mock to verify queue deletion. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information