Skip to content

Scheduler should accept a TimeProvider in ctor for testing purposes #2148

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

Open
AmirShitrit opened this issue Jan 28, 2025 · 0 comments
Open

Comments

@AmirShitrit
Copy link
Contributor

If the Scheduler class (and extension method on ISenderContext) could accept an instance of TimeProvider, it would be possible to test it without actually waiting for the real time to pass.

This could be done by passing a TimeProvider to one of Task.Delays overloads, but it's only available in .NET 8+ (as is TimeProvider).

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

No branches or pull requests

1 participant