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 flatMap not cancelling the upstream eagerly #5133

Merged
merged 1 commit into from
Feb 24, 2017

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 24, 2017

This PR fixes the lack of eager cancellation when flatmapping sources and not stopping the upstream if the inner source fails.

Unit tests were added to verify Single (in case it receives a dedicated implementation one day as currently it delegates to Flowable), Flowable and Observable.

Reported in #5132.

@akarnokd akarnokd added this to the 2.0 backlog milestone Feb 24, 2017
@codecov
Copy link

codecov bot commented Feb 24, 2017

Codecov Report

Merging #5133 into 2.x will increase coverage by 0.02%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##                2.x    #5133      +/-   ##
============================================
+ Coverage     95.92%   95.94%   +0.02%     
+ Complexity     5608     5601       -7     
============================================
  Files           620      620              
  Lines         39810    39820      +10     
  Branches       5597     5599       +2     
============================================
+ Hits          38186    38207      +21     
+ Misses          651      640      -11     
  Partials        973      973
Impacted Files Coverage Δ Complexity Δ
...x/internal/operators/flowable/FlowableFlatMap.java 88% <100%> (+0.05%) 4 <ø> (ø)
...a/io/reactivex/processors/SerializedProcessor.java 91.48% <ø> (-6.39%) 27% <ø> (-1%)
.../operators/completable/CompletableConcatArray.java 93.75% <ø> (-6.25%) 2% <ø> (ø)
.../internal/operators/maybe/MaybeTakeUntilMaybe.java 93.87% <ø> (-6.13%) 2% <ø> (ø)
...a/io/reactivex/internal/util/QueueDrainHelper.java 58.86% <ø> (-5.68%) 31% <ø> (-4%)
.../operators/observable/ObservableFlatMapSingle.java 91.79% <ø> (-4.48%) 2% <ø> (ø)
.../main/java/io/reactivex/subjects/MaybeSubject.java 95.65% <ø> (-4.35%) 46% <ø> (-2%)
...ernal/operators/flowable/FlowableFromIterable.java 91.97% <ø> (-3.21%) 5% <ø> (ø)
...rnal/operators/flowable/FlowableTakeLastTimed.java 96.29% <ø> (-2.78%) 2% <ø> (ø)
...nternal/operators/observable/ObservableCreate.java 97.32% <ø> (-2.68%) 2% <ø> (ø)
... and 36 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 7494a2c...6457c11. Read the comment docs.

@akarnokd akarnokd merged commit 2a4b18e into ReactiveX:2.x Feb 24, 2017
@akarnokd akarnokd deleted the SingleMerge branch February 24, 2017 14:40
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