DelegatingIdlingResourceScheduler does not work with .delay()
Closed this issue · 2 comments
dimrsilva commented
Using this library on my project I see that when using delay() rx operator, the idlingResource returns that it is idle.
Looking at the unit tests I saw this was designed that way. These tests guarantee it:
scheduleWithNonZeroDelayReportsIdle and schedulePeriodicallyWithNonZeroDelayReportsIdle
It is supposed to not work with delay() operator?
dimrsilva commented
I made a commit changing this behavior and I am using it on my project.
JakeWharton commented
Yes this is intentional. The scheduler is idle until the delayed time elapses at which point it's not idle. This specifically does not model the fact that any work is scheduled, as it would break infinite streams using operators like interval()
.