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

2.x: Fix Flowable.take to route post-cancel errors to RxJavaPlugins.onError #5978

Merged
merged 1 commit into from
Apr 29, 2018

Conversation

akarnokd
Copy link
Member

This PR makes sure errors emitted by the upstream just after the Flowable.take has received the specified amount of items get routed to RxJavaPlugins.onError.

Observable.take() and Flowable.limit() were already doing this. Added unit tests to verify the behavior across the board.

@akarnokd akarnokd added this to the 2.2 milestone Apr 29, 2018
@codecov
Copy link

codecov bot commented Apr 29, 2018

Codecov Report

Merging #5978 into 2.x will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##               2.x    #5978      +/-   ##
===========================================
+ Coverage     98.2%   98.23%   +0.03%     
+ Complexity    6052     6049       -3     
===========================================
  Files          656      656              
  Lines        44077    44078       +1     
  Branches      6118     6118              
===========================================
+ Hits         43287    43302      +15     
+ Misses         243      232      -11     
+ Partials       547      544       -3
Impacted Files Coverage Δ Complexity Δ
...ivex/internal/operators/flowable/FlowableTake.java 100% <100%> (ø) 2 <0> (ø) ⬇️
.../operators/flowable/FlowableBlockingSubscribe.java 91.89% <0%> (-5.41%) 9% <0%> (-1%)
...activex/internal/observers/QueueDrainObserver.java 97.43% <0%> (-2.57%) 21% <0%> (-1%)
...perators/single/SingleFlatMapIterableFlowable.java 95.83% <0%> (-2.5%) 2% <0%> (ø)
...nternal/operators/observable/ObservableWindow.java 98% <0%> (-2%) 3% <0%> (ø)
...activex/internal/schedulers/ScheduledRunnable.java 98.07% <0%> (-1.93%) 29% <0%> (-1%)
...java/io/reactivex/processors/UnicastProcessor.java 98.8% <0%> (-1.2%) 67% <0%> (-1%)
...ternal/operators/completable/CompletableMerge.java 97.61% <0%> (-1.2%) 2% <0%> (ø)
...perators/observable/ObservableMergeWithSingle.java 99.06% <0%> (-0.94%) 2% <0%> (ø)
.../operators/mixed/FlowableConcatMapCompletable.java 99.14% <0%> (-0.86%) 2% <0%> (ø)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc94f56...27dc12c. Read the comment docs.

Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

ObservableLimitTest already has this unit test?

@akarnokd
Copy link
Member Author

Not this specific one.

@vanniktech
Copy link
Collaborator

If this is tested in a different test then fine, otherwise it might make sense to also add it.

@akarnokd
Copy link
Member Author

There is no ObservableLimit.

@vanniktech
Copy link
Collaborator

Alright. Then merge.

@akarnokd akarnokd merged commit a1b9628 into ReactiveX:2.x Apr 29, 2018
@akarnokd akarnokd deleted the TakeUndeliverable branch April 29, 2018 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants