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: onReduceBackpressure internals cleanup #7151

Merged
merged 3 commits into from
Jan 19, 2021

Conversation

akarnokd
Copy link
Member

  • Simplify empty/non-empty cases.
  • Fix cancellation order and wrong fall-through.
  • Add deterministic test to cover the reduction cases.

@akarnokd akarnokd added this to the 3.1 milestone Jan 17, 2021
@codecov
Copy link

codecov bot commented Jan 17, 2021

Codecov Report

Merging #7151 (5d2c05f) into 3.x (54850d0) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #7151      +/-   ##
============================================
- Coverage     99.55%   99.53%   -0.03%     
+ Complexity     6709     6707       -2     
============================================
  Files           745      745              
  Lines         47327    47327              
  Branches       6375     6375              
============================================
- Hits          47117    47106      -11     
- Misses           93       99       +6     
- Partials        117      122       +5     
Impacted Files Coverage Δ Complexity Δ
...erators/flowable/FlowableOnBackpressureReduce.java 100.00% <100.00%> (ø) 2.00 <0.00> (ø)
...ors/flowable/FlowableOnBackpressureReduceWith.java 100.00% <100.00%> (ø) 2.00 <0.00> (ø)
...xjava3/internal/observers/FutureMultiObserver.java 96.61% <0.00%> (-3.39%) 27.00% <0.00%> (-1.00%)
.../operators/observable/ObservableFlatMapSingle.java 95.23% <0.00%> (-2.39%) 2.00% <0.00%> (ø%)
...rnal/operators/flowable/FlowableFlatMapSingle.java 95.34% <0.00%> (-2.33%) 2.00% <0.00%> (ø%)
...ternal/operators/observable/ObservablePublish.java 97.29% <0.00%> (-1.81%) 16.00% <0.00%> (-1.00%)
...nternal/operators/observable/ObservableWindow.java 98.21% <0.00%> (-1.79%) 3.00% <0.00%> (ø%)
...va3/internal/operators/parallel/ParallelRunOn.java 98.52% <0.00%> (-1.48%) 8.00% <0.00%> (ø%)
...ternal/operators/observable/ObservableFlatMap.java 97.87% <0.00%> (-0.71%) 3.00% <0.00%> (ø%)
...l/operators/observable/ObservableFlatMapMaybe.java 91.54% <0.00%> (-0.71%) 2.00% <0.00%> (ø%)
... and 7 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 54850d0...4b98a39. Read the comment docs.

@@ -90,6 +90,30 @@ public void simpleBackpressure() {
ts.assertNotComplete();
}

@Test
public void reduceBackpressuredSync() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference from synchronousDrop test, maybe just rename it to reduceBacpressuredSync?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different request pattern.

@akarnokd akarnokd merged commit b77aa1e into ReactiveX:3.x Jan 19, 2021
@akarnokd akarnokd deleted the OnBackpressureReduceCleanup branch January 27, 2021 09:23
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