@@ -0,0 +1,2139 @@
+package com.github.davidmoten.rx;%0A%0Aimport static org.mockito.Mockito.inOrder;%0Aimport static org.mockito.Mockito.mock;%0A%0Aimport org.junit.Test;%0Aimport org.mockito.InOrder;%0A%0Aimport rx.Observable;%0Aimport rx.Observable.OnSubscribe;%0Aimport rx.Subscriber;%0Aimport rx.functions.Action1;%0Aimport rx.functions.Func1;%0Aimport rx.subjects.PublishSubject;%0A%0Apublic class RetryTest %7B%0A%0A    /**%0A     * Checks in a simple and synchronous way that retry resubscribes after%0A     * error. This test fails against 0.16.1-0.17.4, hangs on 0.17.5 and passes%0A     * in 0.17.6 thanks to fix for issue #1027.%0A     */%0A    @SuppressWarnings(%22unchecked%22)%0A    @Test%0A    public void testConcatMapWithRetry() %7B%0A%0A        // record emitted values with this action%0A        Action1%3CInteger%3E record = mock(Action1.class);%0A        InOrder inOrder = inOrder(record);%0A%0A        // always throw an exception with this action%0A        Func1%3CInteger, Observable%3CInteger%3E%3E throwException = new Func1%3CInteger, Observable%3CInteger%3E%3E() %7B%0A            @Override%0A            public Observable%3CInteger%3E call(Integer n) %7B%0A                return Observable.create(new OnSubscribe%3CInteger%3E() %7B%0A                    @Override%0A                    public void call(Subscriber%3C? super Integer%3E subscriber) %7B%0A                        subscriber.onNext(100);%0A                        subscriber.onError(new RuntimeException(%22boo%22));%0A                    %7D%0A                %7D);%0A            %7D%0A        %7D;%0A%0A        // create a retrying observable based on a PublishSubject%0A        PublishSubject%3CInteger%3E subject = PublishSubject.create();%0A        subject%0A        // record item%0A        .doOnNext(record)%0A        // throw a RuntimeException%0A                .concatMap(throwException)%0A                // retry on error%0A                .retry()%0A                // subscribe and ignore%0A                .subscribe();%0A%0A        inOrder.verifyNoMoreInteractions();%0A%0A        subject.onNext(1);%0A        inOrder.verify(record).call(1);%0A%0A        subject.onNext(2);%0A        inOrder.verify(record).call(2);%0A%0A        subject.onNext(3);%0A        inOrder.verify(record).call(3);%0A%0A        inOrder.verifyNoMoreInteractions();%0A    %7D%0A%7D%0A

add extra retry test