Timeout not thrown when using memoize()
memoize().indefinitely() doesn't seem to work the same as cache().
After upgrading from 0.9.0 to 0.13.0 (as a result of upgrading quarkus), one of my Unis doesn't fail with a timeout. The following is not being triggered:
.ifNoItem().after(Duration.ofSeconds(externalCallsTimeoutSeconds)).fail()
.onFailure(TimeoutException.class).transform(throwable -> {
Use case:
I have a uni created with
Uni.combine().all().unis(listOfUnis).combinedWith(combinator).cache();
It combines several rest client calls to backend services.
I then have two subscribers for that, one that will timeout as shown above, and another that doesn't time out. If there's no timeout the second subscriber is cancelled.
The reason for this is to return an error (to the user) if it takes too long to produce a result, but when that happens, still wait for the backend services and build and cache the result for a later request from the user.
I've reproduced the behaviour in the two attached projects, one for each version 0.9 and 0.13. mutiny-cache.zip mutiny-memoize.zip
Java 11 and 12. Gradle 6.7
Edit: I should add that it fails only when having two subscribers.
I submitted a fix in #463.