Skip to content

Commit

Permalink
chore: use list port
Browse files Browse the repository at this point in the history
Use ForListeningPort instead of NewHostPortStrategy as its clearer the intent.

Co-authored-by: Manuel de la Peña <[email protected]>
  • Loading branch information
stevenh and mdelapenya authored Aug 9, 2024
1 parent cd09ecf commit 95d3d24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/redpanda/redpanda.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom

// 8. Wait until Redpanda is ready to serve requests.
err = wait.ForAll(
wait.NewHostPortStrategy(defaultKafkaAPIPort),
wait.NewHostPortStrategy(defaultAdminAPIPort),
wait.NewHostPortStrategy(defaultSchemaRegistryPort),
wait.ForListeningPort(defaultKafkaAPIPort),
wait.ForListeningPort(defaultAdminAPIPort),
wait.ForListeningPort(defaultSchemaRegistryPort),
wait.ForLog("Successfully started Redpanda!"),
).WaitUntilReady(ctx, container)
if err != nil {
Expand Down

0 comments on commit 95d3d24

Please sign in to comment.