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: TestScheduler option to use onSchedule hook #7163

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

akarnokd
Copy link
Member

The TestScheduler is a bit inconsistent regarding the use of RxJavaPlugins.onSchedule. It extends Scheduler so the scheduleDirect methods do invoke the hook whereas the worker's schedule methods don't.

This PR adds a constructor flag to enable the use of the hook in the worker's schedule methods as well. This addition should avoid issues with existing tests not expecting the hook to be invoked all of a sudden.

Resolves #7119

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

codecov bot commented Jan 26, 2021

Codecov Report

Merging #7163 (0e74bd2) into 3.x (e657635) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #7163      +/-   ##
============================================
- Coverage     99.53%   99.53%   -0.01%     
- Complexity     6708     6711       +3     
============================================
  Files           745      745              
  Lines         47332    47345      +13     
  Branches       6376     6380       +4     
============================================
+ Hits          47113    47123      +10     
+ Misses          100       96       -4     
- Partials        119      126       +7     
Impacted Files Coverage Δ Complexity Δ
...va/io/reactivex/rxjava3/schedulers/Schedulers.java 100.00% <ø> (ø) 12.00 <0.00> (ø)
...io/reactivex/rxjava3/schedulers/TestScheduler.java 100.00% <100.00%> (ø) 13.00 <2.00> (+2.00)
...erators/completable/CompletableConcatIterable.java 95.91% <0.00%> (-4.09%) 2.00% <0.00%> (ø%)
...java3/internal/schedulers/TrampolineScheduler.java 97.40% <0.00%> (-2.60%) 6.00% <0.00%> (ø%)
.../operators/observable/ObservableFlatMapSingle.java 94.44% <0.00%> (-2.39%) 2.00% <0.00%> (ø%)
...rnal/operators/flowable/FlowableFlatMapSingle.java 94.18% <0.00%> (-2.33%) 2.00% <0.00%> (ø%)
...tivex/rxjava3/internal/jdk8/ParallelCollector.java 96.33% <0.00%> (-1.84%) 2.00% <0.00%> (ø%)
...a3/internal/operators/flowable/FlowableCreate.java 97.41% <0.00%> (-1.62%) 6.00% <0.00%> (ø%)
...ternal/operators/completable/CompletableMerge.java 97.29% <0.00%> (-1.36%) 2.00% <0.00%> (ø%)
...operators/flowable/FlowableConcatMapScheduler.java 99.20% <0.00%> (-0.40%) 4.00% <0.00%> (ø%)
... and 8 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 e657635...0e74bd2. Read the comment docs.

@akarnokd akarnokd merged commit 1a745a1 into ReactiveX:3.x Jan 27, 2021
@akarnokd akarnokd deleted the TestSchedulerHookUse branch January 27, 2021 09:22
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.

TestScheduler doesn't use RxJavaPlugins.onSchedule hook
2 participants