-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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: Add Observable switchMapX and concatMapX operators #5875
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #5875 +/- ##
============================================
+ Coverage 96.59% 96.76% +0.16%
- Complexity 5893 5921 +28
============================================
Files 652 657 +5
Lines 43403 43986 +583
Branches 6033 6132 +99
============================================
+ Hits 41926 42563 +637
+ Misses 567 544 -23
+ Partials 910 879 -31
Continue to review full report at Codecov.
|
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.
Some small nits. Maybe those renames could be done in a separate PR since this one is already super huge.
disposed = true; | ||
inner.dispose(); | ||
t = errors.terminate(); | ||
if (t != ExceptionHelper.TERMINATED) { |
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.
this path does not seem to be covered. same for 126. Is travis just flaky again?
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.
That's a probabilistic race that the CI tends to not hit, no matter the race-loop count. It gets covered 80% of the time and unfortunately, I'd have to hack the state of the operator to get it execute that inner part a second time.
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.
Yeah thought so. Then never mind.
} else { | ||
disposeInner(); | ||
Throwable ex = errors.terminate(); | ||
if (ex != ExceptionHelper.TERMINATED) { |
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.
this one too
current.dispose(); | ||
} | ||
|
||
SingleSource<? extends R> ms; |
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.
should be ss
|
||
@Test | ||
public void boundaryError() { | ||
PublishSubject<Integer> pp = PublishSubject.create(); |
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.
ps
Reopening due to the Travis/GitHub service problems. The build succeeded but the PR doesn't seem to pick up that state. |
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.
Now it's all good
This PR ports the various
switchMapX
andconcatMapX
operators from #5870, #5871, #5872 and #5873 toObservable
:concatMapCompletable
(replaced by the common implementation)concatMapCompletableDelayError
concatMapMaybe
concatMapMaybeDelayError
concatMapSingle
concatMapSingleDelayError
switchMapCompletable
switchMapCompletableDelayError
switchMapMaybe
switchMapMaybeDelayError
switchMapSingle
(dedicated implementation)switchMapSingleDelayError
(dedicated implementation)This PR concludes the requested set of operators in #4853.
Marbles will be updated/adjusted in a separate PR.