Skip to content

Commit 0a69050

Browse files
committed
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
1 parent cf9ae31 commit 0a69050

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-integration-core/src/test/java/org/springframework/integration/dsl/reactivestreams/ReactiveStreamsTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,9 @@ public static class ContextConfiguration {
306306
public Publisher<Message<String>> reactiveFlow() {
307307
return IntegrationFlow
308308
.from(() -> new GenericMessage<>("a,b,c,d,e,f"),
309-
e -> e.poller(p -> p.trigger(ctx -> this.invoked.getAndSet(true) ? null : Instant.now()))
309+
e -> e.poller(p ->
310+
p.trigger(ctx ->
311+
this.invoked.getAndSet(true) ? null : Instant.now().plusMillis(1000)))
310312
.sendTimeout(256)
311313
.id("reactiveStreamsMessageSource"))
312314
.split(String.class, p -> p.split(","))

0 commit comments

Comments
 (0)