Skip to content

Working with short-lived containers #446

Answered by HofmeisterAn
g0loob asked this question in Q&A
Discussion options

You must be logged in to vote

You can use a custom wait strategy. Similar to:

https://github.com/HofmeisterAn/dotnet-testcontainers/blob/de4c4a251152ee2cfdcd4061c8b1bcc0621e692f/src/DotNet.Testcontainers/Configurations/WaitStrategies/UntilContainerIsRunning.cs#L14

either wait until the container reaches the exit state or use whatever signals a finished run. StartAsync completes when the wait strategies are successful.

GetExitCode returns the exit code of the container.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by g0loob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants