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

Add Time Mocking #327

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add Time Mocking #327

wants to merge 2 commits into from

Conversation

tooolbox
Copy link

This PR adds a WithClock() option, which uses mixer/clock to simulate the passage of time. Tests can be written to, for example, verify the behavior of a given schedule.

This comes in handy for me personally as I'd like to test the interaction of a cron with my own service, over a long period of time.

@tooolbox tooolbox closed this Aug 26, 2020
@tooolbox tooolbox reopened this Jun 16, 2022
@shubham1172
Copy link

+1, @robfig would you be interested in merging this?

@roynwang
Copy link

roynwang commented Nov 8, 2022

+1.
Without mockable clock unit tests are ugly.

@ShiyiWei1995
Copy link

+1.
Without mockable clock unit tests are ugly.

+10086

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.

4 participants