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

Add marble diagram to the Single.filter method #6075

Merged
merged 2 commits into from
Jul 8, 2018

Conversation

UMFsimke
Copy link
Contributor

@UMFsimke UMFsimke commented Jul 8, 2018

Hopefully this should tick off the filter operator in #5788

Please let me know if I need to change anything on the diagram itself. If not, please send me URL when you upload image within the project so I can change URL for the marble in the PR.

Although, I had a doubt and wanted to double check. Operator filter returns Maybe which essentially will call onSuccess or onComplete. By running jUnit tests, I could observe that this is a behavior but if I use TestObserver then both assertValue() and assertComplete() are invoked when there are elements that satisfy filter condition.

@codecov
Copy link

codecov bot commented Jul 8, 2018

Codecov Report

Merging #6075 into 2.x will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6075      +/-   ##
============================================
- Coverage     98.25%   98.23%   -0.03%     
  Complexity     6191     6191              
============================================
  Files           666      666              
  Lines         44806    44806              
  Branches       6206     6206              
============================================
- Hits          44026    44017       -9     
- Misses          234      242       +8     
- Partials        546      547       +1
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/reactivex/Single.java 100% <ø> (ø) 146 <0> (ø) ⬇️
...nternal/operators/observable/ObservableCreate.java 92.3% <0%> (-6.84%) 2% <0%> (ø)
...ava/io/reactivex/processors/BehaviorProcessor.java 95.96% <0%> (-3.14%) 59% <0%> (-1%)
.../operators/observable/ObservableFlatMapSingle.java 88.8% <0%> (-2.99%) 2% <0%> (ø)
.../operators/mixed/FlowableConcatMapCompletable.java 97.43% <0%> (-2.57%) 2% <0%> (ø)
...va/io/reactivex/internal/queue/SpscArrayQueue.java 97.61% <0%> (-2.39%) 22% <0%> (-1%)
.../internal/disposables/ListCompositeDisposable.java 98% <0%> (-2%) 34% <0%> (-1%)
...nternal/operators/parallel/ParallelReduceFull.java 93.06% <0%> (-1.99%) 2% <0%> (ø)
.../io/reactivex/disposables/CompositeDisposable.java 98.14% <0%> (-1.86%) 39% <0%> (-1%)
...ernal/operators/flowable/FlowableFromIterable.java 95.18% <0%> (-1.07%) 5% <0%> (ø)
... and 18 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 e29b57b...592fa5a. Read the comment docs.

@akarnokd akarnokd added this to the 2.2 milestone Jul 8, 2018
@akarnokd
Copy link
Member

akarnokd commented Jul 8, 2018

https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.filter.png

TestObserver implements multiple consumer types and an onSuccess is translated into onNext+onComplete for an easier verification.

@UMFsimke
Copy link
Contributor Author

UMFsimke commented Jul 8, 2018

PR is updated. Thanks for explanation 👍

@akarnokd akarnokd merged commit c8a9852 into ReactiveX:2.x Jul 8, 2018
@UMFsimke UMFsimke deleted the SingleFilterOperatorMarble branch July 8, 2018 21:08
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 participants