-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Tests relied on FakeTimeProvider
failed after upgrading to orleans 8.2.0
#9131
Comments
Orleans doesn't yet fully support testing with a fake |
Yes and that's exactly the problem, as you changed some part of runtime using |
@zeinali-ali perhaps Keyed DI would be useful in the interim before all timers are replaced. For now, are you able to use keyed DI to inject your fake time provider into your grains? Apologies for the hassle |
Sure, we can switch to Keyed-DI to avoid conflict. |
In some of our grains we relied on
TimeProvider
and have written some time-based tests usingMicrosoft.Orleans.TestingHost
but after upgrading to Orleans 8.2.0 it seems there are some unpredictable problems for those test which relied onFakeTimeProvider
we are using this code
siloBuilder.Services.AddSingleton<TimeProvider>(FakeTime);
to setup a fake time-provider.and now we are facing some unpredictable problems like:
siloBuilder.Services.AddSingleton<TimeProvider>(FakeTime)
.FakeTime.SetUtcNow(someTime)
took 10min to executeThe text was updated successfully, but these errors were encountered: