Skip to content

Commit fd87bb8

Browse files
fix(Nats): Use healthz API for readiness probe (#1679)
Co-authored-by: Andre Hofmeister <9199345+HofmeisterAn@users.noreply.github.com>
1 parent a2f5717 commit fd87bb8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Testcontainers.Nats/NatsBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ protected override NatsBuilder Init()
110110
.WithCommand("--debug")
111111
.WithCommand("--trace")
112112
.WithConnectionStringProvider(new NatsConnectionStringProvider())
113-
.WithWaitStrategy(Wait.ForUnixContainer().UntilMessageIsLogged("Server is ready"));
113+
.WithWaitStrategy(Wait.ForUnixContainer().UntilHttpRequestIsSucceeded(request =>
114+
request.ForPath("/healthz").ForPort(NatsHttpManagementPort)));
114115
}
115116

116117
/// <inheritdoc />

0 commit comments

Comments
 (0)