-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
} catch (Exception e) { | ||
timeout = e; | ||
} | ||
private void verify(Iterable<Pair> responses) { |
There was a problem hiding this comment.
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 Pair
s?
} | ||
Response response = client.newCall(request.build()).execute(); | ||
log.debug("response {}", response); | ||
emitter.onSuccess(new Pair(index, response)); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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())); |
There was a problem hiding this comment.
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
No description provided.