From 95d3d2472e92a53690bf22ddce1426934ebaef39 Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Fri, 9 Aug 2024 12:31:04 +0100 Subject: [PATCH] chore: use list port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ForListeningPort instead of NewHostPortStrategy as its clearer the intent. Co-authored-by: Manuel de la Peña --- modules/redpanda/redpanda.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/redpanda/redpanda.go b/modules/redpanda/redpanda.go index 35a000d320f..779ba23f448 100644 --- a/modules/redpanda/redpanda.go +++ b/modules/redpanda/redpanda.go @@ -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 {