These are chat archives for ReactiveX/RxJava

14th
Nov 2016
Monkey
@Even201314
Nov 14 2016 06:19
```Observable.create(new ObservableOnSubscribe<User>() {
    @Override
    public void subscribe(ObservableEmitter<User> emitter) throws Exception {
        emitter.onNext(new User("Even201314", 14));
    }
}).repeatUntil(new BooleanSupplier() {
    @Override
    public boolean getAsBoolean() throws Exception {
        repeatCount += 1;
        Log.d(TAG, "count: " + repeatCount);
        return repeatCount > 10;
    }
})
I would like to know ,if I use Observable.create() , would the method repeatUntil() be executed?
David Karnok
@akarnokd
Nov 14 2016 08:03
@jtuchek The Reactive-Streams TCK has such test infrastructure but we can only use it for RxJava 2 Flowables. There is no compact test support for 1.x Observable and you have to manually write TestSubscriber.requestMore calls and verify you got exactly the right amount after.
@Even201314 You need an emitter.onComplete() otherwise the repeat won't get triggered.
Monkey
@Even201314
Nov 14 2016 08:19
@akarnokd Thx
Justin Tuchek
@justintuchek
Nov 14 2016 11:29
@akarnokd I’ll take a look, thanks for the guidance :thumbsup: