-
Notifications
You must be signed in to change notification settings - Fork 7.6k
1.x: improve coverage of rx.Observable methods #4178
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
Conversation
Current coverage is 83.04%@@ 1.x #4178 diff @@
==========================================
Files 261 261
Lines 16921 16918 -3
Methods 0 0
Messages 0 0
Branches 2554 2555 +1
==========================================
+ Hits 13773 14049 +276
+ Misses 2251 1993 -258
+ Partials 897 876 -21
|
new FailingObservable().subscribe(ts); | ||
fail("Should have thrown OnErrorFailedException"); | ||
} catch (OnErrorFailedException ex) { | ||
// expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you really wanted to be comprehensive here you could put TestException
in a method local and verify assertSame(ex.getCause(), testException)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just add a message to TestException
and assert the cause's message would basically achieve the same thing.
lgtm 👍 |
@@ -10699,14 +10702,14 @@ public final Subscription subscribe(Subscriber<? super T> subscriber) { | |||
* <dd>The operator doesn't interfere with backpressure which is determined by the source {@code Observable}'s backpressure | |||
* behavior.</dd> | |||
* <dt><b>Scheduler:</b></dt> | |||
* <dd>{@code timeInterval} operates by default on the {@code immediate} {@link Scheduler}.</dd> | |||
* <dd>{@code timeInterval} operates by default on the {@code computation} {@link Scheduler}.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this operator does not "operate" on the scheduler, it uses it only as source of time
Updated. |
Thanks for the review. I'm merging this as it may contain the cure for the memory-kill on Travis. Let me know if there are tests that need more tidying up. |
This PR improves the coverage of
rx.Observable
methods plusequals()
fromTestException
as it caused anomalies with deduplication insideCompositeException
timestamp
andtimeInterval
now use theSchedulers.computation()
as the source for the current time instead ofSchedulers.immediate()
which can't be properly hooked. By default, they both returnSystem.currentTimeMillis()
.