From 489e8a34f9b4f728cc93f4d80c4e543783d20454 Mon Sep 17 00:00:00 2001 From: Javier Aliaga Date: Mon, 26 Oct 2026 11:52:13 +0100 Subject: [PATCH] test: wait for outbox subscription in ProducerAppIT The test only waited for the declarative "topic" subscription, which daprd lists before it sees the app as healthy. The outbox POST could then reach daprd before it subscribed to the outbox topics, and RabbitMQ dropped the unroutable message. Also wait for the app-declared "outbox-topic" subscription. Signed-off-by: Javier Aliaga --- .../io/dapr/springboot/examples/producer/ProducerAppIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-boot-examples/pubsub/producer-app/src/test/java/io/dapr/springboot/examples/producer/ProducerAppIT.java b/spring-boot-examples/pubsub/producer-app/src/test/java/io/dapr/springboot/examples/producer/ProducerAppIT.java index b6c464b26b..61047d4c71 100644 --- a/spring-boot-examples/pubsub/producer-app/src/test/java/io/dapr/springboot/examples/producer/ProducerAppIT.java +++ b/spring-boot-examples/pubsub/producer-app/src/test/java/io/dapr/springboot/examples/producer/ProducerAppIT.java @@ -62,6 +62,9 @@ void setUp() { org.testcontainers.Testcontainers.exposeHostPorts(8080); DaprWait.forSubscription("pubsub", "topic").waitUntilReady(daprContainer); + // "topic" is declarative and is listed before daprd sees the app as healthy. "outbox-topic" comes + // from the app, so it is listed only once daprd starts subscribing, including to the outbox topic. + DaprWait.forSubscription("pubsub", "outbox-topic").waitUntilReady(daprContainer); } @AfterEach