Skip to content

Instantly share code, notes, and snippets.

@vy vy/
Created Apr 26, 2016

What would you like to do?
RxJava Retry Tests
public class Test {
public static void main(String[] args) {
Observable<Integer> o0 = Observable.error(new Exception());
Observable<Integer> o1 = Observable.just(1);
Observable<Integer> os = Observable.concat(o0, o0, o1);
Integer value = os.retry(3).toSingle().toBlocking().value();
System.out.format("value: %s\n", value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.