Skip to content

Conversation

omo
Copy link
Contributor

@omo omo commented Nov 21, 2014

It should be called before lift() so that the operator can observe it on the main thread.

I tried to write a test but it didn't work, presumably because Robolectric doesn't have an event loop?

omo referenced this pull request Nov 21, 2014
@dpsm
Copy link
Contributor

dpsm commented Nov 21, 2014

@omo can you post your test to the pull request as well so I can pull it down and help you with robolectric? It is important that we have tests that specify these kinds of behaviours as we decide on them.

Thanks!

@omo
Copy link
Contributor Author

omo commented Nov 21, 2014

@dpsm Well, I should've tried a bit harder. A quick googling told me that Robolectric has a way a way to pump the event loop.

Added tests. PTAL?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wow, this is exactly what I wanted here. Thanks for the tip! Updated.

@JakeWharton
Copy link
Contributor

This needs a rebase now.

@omo
Copy link
Contributor Author

omo commented Nov 21, 2014

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this right? I thought it moved to rx.android.internal.

It should be called before lift() so that the operator can observe it on the main thread.
This change also adds some test for other bindXx() variants to get better coverage.
@omo
Copy link
Contributor Author

omo commented Nov 21, 2014

Oops. I left some change uncommitted. Sorry about that. It should be fixed now.

@omo
Copy link
Contributor Author

omo commented Nov 24, 2014

Ping? This is a regression fix with test. Travis build is green :-)

mttkay added a commit that referenced this pull request Nov 24, 2014
Fix observeOn() invocation order.
@mttkay mttkay merged commit c22d0bb into ReactiveX:0.x Nov 24, 2014
@mttkay
Copy link
Collaborator

mttkay commented Nov 24, 2014

LGTM 👍

@omo
Copy link
Contributor Author

omo commented Nov 24, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants