Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/frontend/src/content/docs/testing/accessing-resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ await app.ResourceNotifications.WaitForResourceHealthyAsync(

This resource-notification pattern ensures that the resources are available before running the tests, avoiding potential issues with the tests failing due to the resources not being ready.

<Aside type="tip">
If a resource fails during startup (for example, a container exits
immediately or an executable can't be found), Aspire flushes any captured
resource logs before it publishes the terminal (`Exited` or `FailedToStart`)
state notification. That means test code awaiting `WaitForResourceAsync`
with a terminal state can rely on the resource's stdout/stderr output being
present in the captured host logs at the point the wait completes, which
makes fast-failing resources easier to diagnose.
Comment on lines +50 to +56
</Aside>

## Start & Stop

In some cases, you may want to manually start a resource when it is not initially started, for when the resource was created `WithExplicitStart` for example.
Expand Down
Loading