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 timed replay-like components replaying outdated items #5140

Merged
merged 1 commit into from
Feb 27, 2017

Conversation

akarnokd
Copy link
Member

The timed versions of Flowable.replay(), ReplayProcessor, Observable.replay() and ReplaySubject all replay outdated items to new subscribers and through the getValues() and size() state-peeking methods, similar to issue #3917 resolved via #4023.

The fix includes a node-walk for new subscribers that skips old entries. Some unit tests weren't logically considering the emission pattern (i.e., items timed out shouldn't appear) and have been fixed as well.

Reported in #5139.

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

codecov bot commented Feb 27, 2017

Codecov Report

Merging #5140 into 2.x will decrease coverage by -0.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##                2.x    #5140      +/-   ##
============================================
- Coverage     95.96%   95.96%   -0.01%     
+ Complexity     5611     5601      -10     
============================================
  Files           620      620              
  Lines         39820    39850      +30     
  Branches       5599     5603       +4     
============================================
+ Hits          38215    38242      +27     
  Misses          633      633              
- Partials        972      975       +3
Impacted Files Coverage Δ Complexity Δ
.../java/io/reactivex/processors/ReplayProcessor.java 98.76% <100%> (ø) 49 <0> (ø)
...ex/internal/operators/flowable/FlowableReplay.java 90.09% <100%> (+0.32%) 17 <0> (ø)
...main/java/io/reactivex/subjects/ReplaySubject.java 97.11% <100%> (-0.22%) 51 <0> (ø)
...nternal/operators/observable/ObservableReplay.java 96.96% <100%> (-1.14%) 18 <0> (ø)
...rnal/subscriptions/ArrayCompositeSubscription.java 93.33% <0%> (-6.67%) 17% <0%> (-1%)
...ternal/operators/completable/CompletableUsing.java 95.23% <0%> (-4.77%) 4% <0%> (ø)
...erators/completable/CompletableConcatIterable.java 95.91% <0%> (-4.09%) 2% <0%> (ø)
...io/reactivex/internal/util/BackpressureHelper.java 95.91% <0%> (-4.09%) 21% <0%> (-1%)
...internal/operators/completable/CompletableAmb.java 94.44% <0%> (-3.71%) 10% <0%> (-1%)
...reactivex/internal/operators/single/SingleAmb.java 96.36% <0%> (-3.64%) 9% <0%> (-1%)
... and 37 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 a03bf90...6377b58. Read the comment docs.

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