Skip to content
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

Ensure now() is always updated in TestScheduler.advanceTo/By #308

Merged
merged 1 commit into from
Jul 22, 2013

Conversation

NorthNick
Copy link
Contributor

The TestScheduler advanceTimeTo() and advanceTimeBy() methods only update now() correctly if there is a scheduled event in the work queue after the target time. If the queue is empty, now() is not updated at all. If it has no items after the target time, then now() is updated to the time of the last event on the queue.

The pull request ensures now() is always updated to the target time. There is no check to make sure time always moves forwards, but then that check is not in the current implementation either.

@cloudbees-pull-request-builder

RxJava-pull-requests #184 SUCCESS
This pull request looks good

@benjchristensen
Copy link
Member

Makes sense to me, thanks @NorthNick

benjchristensen added a commit that referenced this pull request Jul 22, 2013
Ensure now() is always updated in TestScheduler.advanceTo/By
@benjchristensen benjchristensen merged commit 9ffd288 into ReactiveX:master Jul 22, 2013
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
Ensure now() is always updated in TestScheduler.advanceTo/By
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
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