MsSqlContainer UntilContainerIsHealthy wait strategy is not working for me #1167
-
Hello guys, good evening. Well, I really looked everywhere, and I could not find anything about how to use the UntilContainerIsHealthy with the MsSqlContainer. My integration test is failing because some database calls are being triggered before the container is indeed ready to accept calls, even though I'm waiting for the port to be ready. Can someone provide me a sample or any advice on how to correctly wait for some sort of healthy or startup completion state? This is how I'm currently configuring my MsSqlContainer: Because I'm using the UntilContainerIsHealthy strategy the StartAsync method never finishes. Thanks for all the help in advance. Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
These wait strategies won't work with MSSQL. 1) The port becomes available before the actual service. 2) AFAIK the image does not provide a HEALTHCHECK. Why don't you use the MSSQL module?
Modules are preconfigured and contain proven best practices. The MSSQL module uses the following wait strategy. |
Beta Was this translation helpful? Give feedback.
-
Using the preconfigured wait strategy solved for me! Thanks for the explanation man! Have a great week! 👊💪 |
Beta Was this translation helpful? Give feedback.
These wait strategies won't work with MSSQL. 1) The port becomes available before the actual service. 2) AFAIK the image does not provide a HEALTHCHECK. Why don't you use the MSSQL module?
Modules are preconfigured and contain proven best practices. The MSSQL module uses the following wait strategy.