Comment From: wilkinsona
Current Californium snapshots cause a test in spring-boot-actuator
to fail:
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] CachingOperationInvokerTests.cacheInTtlWithFluxResponse:94 expected:<[1]> but was:<[2]>
[INFO]
[ERROR] Tests run: 963, Failures: 1, Errors: 0, Skipped: 0
It appears that Flux caching doesn't work. The following pure Reactor test passes with SR-15 but fails with the current BUILD-SNAPSHOT of Californium:
@Test
public void fluxCaching() {
AtomicInteger invocations = new AtomicInteger();
Flux<String> flux = Flux.fromIterable(() -> {
invocations.incrementAndGet();
return Arrays.asList("spring", "boot").iterator();
}).cache(Duration.ofHours(1));
assertThat(flux.blockLast()).isEqualTo("boot");
assertThat(flux.blockLast()).isEqualTo("boot");
assertThat(invocations).hasValue(1);
}
The test fails because the value of invocations
is two.