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

TestSubject event scheduling works differently than specified in its javadoc #1759

Closed
akarnokd opened this issue Oct 15, 2014 · 4 comments
Closed
Milestone

Comments

@akarnokd
Copy link
Member

The javadoc indicates that using the onNext(T value, long timeInMilliseconds) and the other methods will schedule an event emission to the specified absolute time, but the code schedules the emission relative to the underlying scheduler's now() value. This only works as expected when using with the TestScheduler at time 0. I don't see any uses of this class and suggest removing it completely to avoid confusion.

@zsxwing
Copy link
Member

zsxwing commented Oct 15, 2014

+1 for removing TestSubject

@benjchristensen
Copy link
Member

I have used it in the Turbine project with success.

Help me confirm the confusion, is it because it has both onNext(T) and onNext(T, timeInMilliseconds)?

If that's why then yes I can see why it's confusing. It works, but only if you know how to use it.

Here is an examples of me using it: https://github.com/Netflix/Turbine/blob/22246ce26d812813e2a242d2f42cfc432a45a8b2/turbine-core/src/test/java/com/netflix/turbine/aggregator/StreamAggregatorTest.java#L604

@benjchristensen
Copy link
Member

@headinthebox Do you have an opinion on keeping or removing this? I'm okay removing it due to its confusion.

benjchristensen added a commit to benjchristensen/RxJava that referenced this issue Oct 24, 2014
@benjchristensen
Copy link
Member

Added docs in #1796 while reviewing with @headinthebox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants