Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "testqueue" for unit tests #1603

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Use "testqueue" for unit tests #1603

wants to merge 1 commit into from

Conversation

robhudson
Copy link
Contributor

@robhudson robhudson commented Dec 27, 2024

I noticed that when I run basket locally, it often had tasks being retried from the test runs. The retried tasks were being left scheduled in Redis after a test run, so running basket would retry them.

This updates the default queue in tests to use a separate queue. Apparently the queue.empty() only clears the active queue, not the ScheduledJobRegistry. It looks to be a bit of a pain to remove scheduled jobs, but not impossible. I can add this at some future time.

Regardless, it's probably a better idea to use a separate queue for testing just like we have a separate db for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant