Skip to content

Commit d84c3d2

Browse files
committed
use env
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent 6cd3f90 commit d84c3d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/rabbitmqamqp/amqp_connection_recovery_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var _ = Describe("Recovery connection test", func() {
2323
*/
2424

2525
name := "connection should reconnect producers and consumers if dropped by via REST API"
26-
connection, err := Dial(context.Background(), "amqp://", &AmqpConnOptions{
26+
env := NewEnvironment("amqp://", &AmqpConnOptions{
2727
SASLType: amqp.SASLTypeAnonymous(),
2828
ContainerID: name,
2929
// reduced the reconnect interval to speed up the test
@@ -34,6 +34,8 @@ var _ = Describe("Recovery connection test", func() {
3434
},
3535
Id: "reconnect producers and consumers",
3636
})
37+
38+
connection, err := env.NewConnection(context.Background())
3739
Expect(err).To(BeNil())
3840
ch := make(chan *StateChanged, 1)
3941
connection.NotifyStatusChange(ch)

0 commit comments

Comments
 (0)