Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
This commit is contained in:
Gabriele Santomaggio 2025-03-05 10:30:08 +01:00
parent 6cd3f90025
commit d84c3d22de
No known key found for this signature in database
GPG Key ID: D5408D3DD8911AEB
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ var _ = Describe("Recovery connection test", func() {
*/ */
name := "connection should reconnect producers and consumers if dropped by via REST API" 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(), SASLType: amqp.SASLTypeAnonymous(),
ContainerID: name, ContainerID: name,
// reduced the reconnect interval to speed up the test // reduced the reconnect interval to speed up the test
@ -34,6 +34,8 @@ var _ = Describe("Recovery connection test", func() {
}, },
Id: "reconnect producers and consumers", Id: "reconnect producers and consumers",
}) })
connection, err := env.NewConnection(context.Background())
Expect(err).To(BeNil()) Expect(err).To(BeNil())
ch := make(chan *StateChanged, 1) ch := make(chan *StateChanged, 1)
connection.NotifyStatusChange(ch) connection.NotifyStatusChange(ch)