From 79560aab88c51743f0064ae207ed2beffc3b8a18 Mon Sep 17 00:00:00 2001 From: Javier Aliaga Date: Mon, 26 Oct 2026 12:39:08 +0100 Subject: [PATCH] test: wait for outbox subscription in ProducerAppIT (#1872) 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 (cherry picked from commit 00f769f251757c8cd8a8ea6626ad78fe6c00b401) --- .../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