-
Notifications
You must be signed in to change notification settings - Fork 133
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
FakeAsync can't always flush timers properly #583
Comments
Have the same problem. Is there any chance of update? |
/cc @yjbanov for thoughts. |
This issue has been reported to the RxDart issues tracker a few times, and I've also seen it crop up on the Flutter side as well. It looks like Stream.periodic also uses flutter/flutter#40074 |
Thanks for the detailed report. I can reproduce this locally. I'm not yet sure what we can do about it in dart-lang/sdk#40131 seems to be the right place for this discussion. I'll see if I can contribute to that discussion. |
Hi is there any updates? Thanks |
There are cases, when
flushTimers
can't properly work.Here is the test case:
Here is the result:
The reason for failure is that sometimes subscription
cancel
method returnsFuture._nullFuture
. TheonDone
callback will be called after resolving of this Future, but it is already resolved. So, it will be called withscheduleMicrotask
of the zone where the Future was resolved, and it is the root zone forFuture._nullFuture
. See this issue for additional details.I have a lot of failing tests just because of such behavior and I am trying to find a proper solution.
The text was updated successfully, but these errors were encountered: