Skip to content

Commit bd9744c

Browse files
committed
check for both port and log
1 parent 7ae5904 commit bd9744c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/nats/nats.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom
3333
Image: img,
3434
ExposedPorts: []string{defaultClientPort, defaultRoutingPort, defaultMonitoringPort},
3535
Cmd: []string{"-DV", "-js"},
36-
WaitingFor: wait.ForLog("Server is ready"),
36+
WaitingFor: wait.ForAll(
37+
wait.ForListeningPort(defaultClientPort),
38+
wait.ForLog("Server is ready"),
39+
),
3740
}
3841

3942
genericContainerReq := testcontainers.GenericContainerRequest{

0 commit comments

Comments
 (0)