Skip to content

Comments

Add Time Mocking#327

Open
tooolbox wants to merge 2 commits intorobfig:masterfrom
tooolbox:feature/mock
Open

Add Time Mocking#327
tooolbox wants to merge 2 commits intorobfig:masterfrom
tooolbox:feature/mock

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.

@ghost
Copy link

ghost commented Nov 8, 2022

+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.

3 participants