From d84c3d22de34b767e55e68e4f0fc54137b506924 Mon Sep 17 00:00:00 2001 From: Gabriele Santomaggio Date: Wed, 5 Mar 2025 10:30:08 +0100 Subject: [PATCH] use env Signed-off-by: Gabriele Santomaggio --- pkg/rabbitmqamqp/amqp_connection_recovery_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/rabbitmqamqp/amqp_connection_recovery_test.go b/pkg/rabbitmqamqp/amqp_connection_recovery_test.go index 5a4481a..bf6ee38 100644 --- a/pkg/rabbitmqamqp/amqp_connection_recovery_test.go +++ b/pkg/rabbitmqamqp/amqp_connection_recovery_test.go @@ -23,7 +23,7 @@ var _ = Describe("Recovery connection test", func() { */ name := "connection should reconnect producers and consumers if dropped by via REST API" - connection, err := Dial(context.Background(), "amqp://", &AmqpConnOptions{ + env := NewEnvironment("amqp://", &AmqpConnOptions{ SASLType: amqp.SASLTypeAnonymous(), ContainerID: name, // reduced the reconnect interval to speed up the test @@ -34,6 +34,8 @@ var _ = Describe("Recovery connection test", func() { }, Id: "reconnect producers and consumers", }) + + connection, err := env.NewConnection(context.Background()) Expect(err).To(BeNil()) ch := make(chan *StateChanged, 1) connection.NotifyStatusChange(ch)