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

TACO-20 adding rx in tests for easy async #228

Merged
merged 3 commits into from
May 4, 2018
Merged

Conversation

manimaul
Copy link
Collaborator

@manimaul manimaul commented May 3, 2018

No description provided.

@coveralls
Copy link

coveralls commented May 3, 2018

Coverage Status

Coverage remained the same at 41.837% when pulling e92e8b5 on wk/TACO-20-rx-tests into 3dec49a on master.

} catch (Exception e) {
timeout = e;
}
private void verify(Iterable<Pair> responses) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you put a blurb in here explaining how you're using javarx to produce/consume Pairs?

}
Response response = client.newCall(request.build()).execute();
log.debug("response {}", response);
emitter.onSuccess(new Pair(index, response));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm assuming that javarx is going to catch exceptions and emit them as failures

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

right - SingleObserver has an onError method... for tests we're just using blockingIterable which will throw when onError is observed

log.debug("response {}", response);
emitter.onSuccess(new Pair(index, response));
})
.subscribeOn(Schedulers.io()));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sultle nuance to rxjava: subscribeOn can only be applied once to the upstream source ... this schedules work on the rx "io" thread pool

@manimaul manimaul merged commit dbed2db into master May 4, 2018
@manimaul manimaul deleted the wk/TACO-20-rx-tests branch May 4, 2018 15:55
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