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

3.x: Reenable XFlatMapTest.maybeSingle, add missing Single operators #6893

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

akarnokd
Copy link
Member

Reenable the XFlatMapTest.maybeSingle and make sure all flatMap variants behave the same when the flow is cancelled/disposed while the mapper function is executing, thus the returned inner source doesn't get subscribed to at all.

Resolves #6892

While adding the extra tests, I noticed two flatMap variant is missing from Single:

  • A combiner of the original and inner success item: flatMap(Function<T, Single<U>>, BiFunction<T, U, R>)
  • A notification-type mapper: flatMap(Function<T, Single<R>>, Function<Throwable, Single<R>>)

image
image

Lastly, the same combiner variant for Maybe received a marble diagram too:

image

Related #5806

@codecov
Copy link

codecov bot commented Jan 29, 2020

Codecov Report

Merging #6893 into 3.x will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #6893      +/-   ##
============================================
+ Coverage     98.25%   98.29%   +0.04%     
- Complexity     6590     6599       +9     
============================================
  Files           740      742       +2     
  Lines         47293    47399     +106     
  Branches       6430     6443      +13     
============================================
+ Hits          46468    46593     +125     
+ Misses          300      292       -8     
+ Partials        525      514      -11
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/reactivex/rxjava3/core/Maybe.java 100% <ø> (ø) 208 <0> (ø) ⬇️
...3/internal/operators/maybe/MaybeFlatMapSingle.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...rnal/operators/maybe/MaybeFlatMapNotification.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...rc/main/java/io/reactivex/rxjava3/core/Single.java 100% <100%> (ø) 190 <2> (+2) ⬆️
...ernal/operators/single/SingleFlatMapPublisher.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...al/operators/single/SingleFlatMapNotification.java 100% <100%> (ø) 2 <2> (?)
...rnal/operators/single/SingleFlatMapBiSelector.java 100% <100%> (ø) 2 <2> (?)
...ternal/operators/mixed/MaybeFlatMapObservable.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...nternal/operators/mixed/MaybeFlatMapPublisher.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...ernal/operators/mixed/SingleFlatMapObservable.java 100% <100%> (ø) 2 <0> (ø) ⬇️
... and 28 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 f1a795d...56cd9dd. Read the comment docs.

@akarnokd akarnokd merged commit c181169 into ReactiveX:3.x Jan 29, 2020
@akarnokd akarnokd deleted the XFlatMapMaybeSingle branch January 29, 2020 11:52
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.

3.x: Reenable XFlatMapTest.maybeSingle
1 participant