Skip to content

test: wait for outbox subscription in ProducerAppIT - #1872

Merged
dapr-bot merged 1 commit into
dapr:masterfrom
javier-aliaga:fix/producer-app-it-outbox-wait
Oct 26, 2026
Merged

dapr-bot merged 1 commit into
dapr:masterfrom
javier-aliaga:fix/producer-app-it-outbox-wait

Conversation

@javier-aliaga

Copy link
Copy Markdown
Contributor

Description

ProducerAppIT.testOrdersOutboxEndpointAndMessaging fails intermittently in the dapr/dapr dapr-test-sdk nightly run (2026-10-23 and 2026-10-26, e.g. https://github.com/dapr/dapr/actions/runs/40251991248/job/121345718767) with expected <1> but was <0> within 15 seconds.

setUp only waited for the topic subscription. That subscription is declarative, so daprd lists it in metadata before it sees the app as healthy. daprd subscribes to outbox-topic and to the internal outbox topic only once the app is healthy. When the outbox POST arrives before that, RabbitMQ drops the unroutable message and the event never reaches the subscriber.

This PR also waits for the outbox-topic subscription, which the app declares through @Topic. daprd lists it only once it has seen the app as healthy and starts subscribing. DaprPubSubOutboxIT already waits for its outbox topic the same way.

Verified locally:

  • With a temporary health endpoint that returns 503 for the first 5 seconds, the unchanged test fails with the same error as CI. With the fix it passed 3 out of 3 runs.
  • The full ProducerAppIT passes (2/2) without the temporary endpoint.

Issue reference

No issue; CI flake in dapr/dapr dapr-test-sdk.

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

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 <javier@diagrid.io>
@javier-aliaga
javier-aliaga requested review from a team as code owners October 26, 2026 10:52
Copilot AI lite review requested due to automatic review settings October 26, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.21%. Comparing base (15bec05) to head (489e8a3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1872   +/-   ##
=========================================
  Coverage     80.21%   80.21%           
  Complexity     2801     2801           
=========================================
  Files           273      273           
  Lines          8278     8278           
  Branches        896      896           
=========================================
  Hits           6640     6640           
  Misses         1272     1272           
  Partials        366      366           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dapr-bot
dapr-bot merged commit 00f769f into dapr:master Oct 26, 2026
18 checks passed
dapr-bot added a commit that referenced this pull request Oct 26, 2026
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.


(cherry picked from commit 00f769f)

Signed-off-by: Javier Aliaga <javier@diagrid.io>
Co-authored-by: Javier Aliaga <javier@diagrid.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants