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

Schedule tasks with negative delays immediately as per Scheduler spec #347

Merged
merged 1 commit into from Nov 10, 2016
Merged

Schedule tasks with negative delays immediately as per Scheduler spec #347

merged 1 commit into from Nov 10, 2016

Conversation

samueltardieu
Copy link
Contributor

This fixes the issue in #346.

scheduler.schedulePeriodicallyDirect(new CountingRunnable(), 1, -1, MINUTES);
fail();
} catch (IllegalArgumentException e) {
assertEquals("period < 0: -1", e.getMessage());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be removed. A negative period makes no sense.

worker.schedulePeriodically(new CountingRunnable(), 1, -1, MINUTES);
fail();
} catch (IllegalArgumentException e) {
assertEquals("period < 0: -1", e.getMessage());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be removed. A negative period makes no sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this error message supposed to come from? Grepping RxAndroid and RxJava for "period < 0" gives no result. Moreover, wouldn't such test belong in RxJava?

I thought that these tests were disabled anyway, but I can reinstate them if you prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is ignored because it's currently not implemented natively. That still doesn't change the fact that its removal is unrelated to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I will amend the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JakeWharton This has been amended, I don't know if you expect a ping, but in any case here it is.

@JakeWharton JakeWharton merged commit e628d1b into ReactiveX:2.x Nov 10, 2016
@JakeWharton
Copy link
Member

I'll do a point release tomorrow or Friday. Thanks!

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.

None yet

2 participants