Hi guys, maybe someone can shed some extra light o...
# rx
f
Hi guys, maybe someone can shed some extra light on this for me. I have such test case:
Copy code
@Test fun `completeable trampoline test`() {
        Completable.defer { Completable.complete() }
            .doOnComplete { println("I'm completing!") }
            .andThen(
                Completable.complete()
                    .timeout(1, TimeUnit.SECONDS, Schedulers.trampoline())
                    .doOnComplete { println("I'm not completing ! :( ") }
            )
            .subscribeOn(Schedulers.trampoline())
            .test()
            .assertComplete()

        // timeout exception is thrown
    }
It's not completing. It's throwing TimeoutError. I'm wondering how this chain is actually executed. I know Trampoline is putting a thread to sleep when used in
timeout
for example but my question is why the Completables do not complete (or actually only the second Completable) before that actually happens. (PS. I'm aware that TestSchedulers should be used, it's just for better understanding purposes)