Add test for retry exhaustion moving task to failed queue#70
Add test for retry exhaustion moving task to failed queue#70tejakusireddy wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
@tejakusireddy , if you plan to submit more regularly, installing the pre-commit hook might be worth it :-) it catches all these linting errors before committing/pushing. |
e09f547 to
9fe4105
Compare
|
@tejakusireddy , can you describe why you think this particular test is important to have? Any ideas about making this work for service bus backend? |
|
@temporaer Thanks, I’ll set up the pre-commit hook before sending more PRs. For this test, I added it because retry exhaustion is the terminal failure path for storage-backed queues. When For Service Bus, the equivalent path would be DLQ/dead-letter behavior rather than the storage failed queue. I kept this PR storage-focused to avoid adding another live Service Bus test, but a follow-up could cover the Service Bus path either with a mocked backend/envelope unit test or a live DLQ test if that’s preferred. |
|
@tejakusireddy thank you. While adding tests is good work, especially bug fixes and feature contributions are welcomed. |
|
@temporaer Makes sense, thanks for the guidance. I’ll focus future contributions more on small bug fixes or feature improvements, with tests included where appropriate. |
Summary
Adds a non-live test covering retry exhaustion behavior for storage-backed queues.
The test verifies that when a task has no retries left and the callback fails,
pull_and_execute()returnsFalse, removes the task from the main queue, and moves the serialized task to the failed queue.Testing
ruff check tests/test_api.pypytest tests/test_api.py::test_retry_exhaustion_moves_task_to_failed_queue -qpytest tests/test_api.py -qgit diff --check