Add 1 sec delay to the ReactiveStreamsTests.reactiveFlow poller

Looks like there is some race condition in starting endpoints in the flow,
and poller was able to emit message before downstream channel is subscribed
This commit is contained in:
Artem Bilan
2025-06-03 13:02:05 -04:00
parent cf9ae314d1
commit 0a690504ee

View File

@@ -306,7 +306,9 @@ public class ReactiveStreamsTests {
public Publisher<Message<String>> reactiveFlow() {
return IntegrationFlow
.from(() -> new GenericMessage<>("a,b,c,d,e,f"),
e -> e.poller(p -> p.trigger(ctx -> this.invoked.getAndSet(true) ? null : Instant.now()))
e -> e.poller(p ->
p.trigger(ctx ->
this.invoked.getAndSet(true) ? null : Instant.now().plusMillis(1000)))
.sendTimeout(256)
.id("reactiveStreamsMessageSource"))
.split(String.class, p -> p.split(","))