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: subscribeOn allow cancelling before the actual subscription happens (just like 1.x) #4222

Merged
merged 1 commit into from
Jul 22, 2016

Conversation

akarnokd
Copy link
Member

This PR fixes the subscribeOn operator to allow cancellation before the actual subscription to the source takes place - just like how 1.x works.

@codecov-io
Copy link

Current coverage is 68.55%

Merging #4222 into 2.x will increase coverage by <.01%

@@                2.x      #4222   diff @@
==========================================
  Files           411        411          
  Lines         29486      29490     +4   
  Methods           0          0          
  Messages          0          0          
  Branches       4777       4779     +2   
==========================================
+ Hits          20212      20216     +4   
+ Misses         7252       7251     -1   
- Partials       2022       2023     +1   

Powered by Codecov. Last updated by 4577f1a...d896729

TestScheduler test = Schedulers.test();

TestSubscriber<Integer> ts = Flowable.just(1).hide()
.subscribeOn(test).test(Long.MAX_VALUE, 0, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not dispose()? In general, why same tests are different?

Copy link
Member Author

Choose a reason for hiding this comment

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

Observable doesn't have backpressure, and a test method yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok got it, so you would use test() for both while I'd use dispose(), ok

@artem-zinnatullin
Copy link
Contributor

👍

@akarnokd akarnokd merged commit 708310a into ReactiveX:2.x Jul 22, 2016
@akarnokd akarnokd deleted the SubscribeOnClassic branch July 22, 2016 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants