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

fix(test) reduce queue persistence test time from 60 secs to 6 secs #21142

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

igorzi
Copy link

@igorzi igorzi commented Nov 10, 2023

This PR reduces the time to run queue persistence with inflight messages test from 60 seconds down to about 6 seconds.

The test simulates a crash to ensure that inflight messages are cleaned up and re-queued when the new process starts. Since messages are considered dead after 5 seconds of being queued, reopening the db within 5 seconds does not re-queue the messages on startup (they do get re-queued after 60 seconds, which is the cleanup frequency). By waiting for 5 seconds before reopening the db, the test ensures that the cleanup happens quickly when the db is opened.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit f430543 into main Nov 10, 2023
@bartlomieju bartlomieju deleted the fix_queue_test branch November 10, 2023 10:28
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.

3 participants