@@ -17,7 +17,10 @@ import (
1717func TestConsumerPublisherMetrics (t * testing.T ) {
1818 t .Run ("ACK event" , func (t * testing.T ) {
1919 connection := bunnify .NewConnection ()
20- connection .Start ()
20+ if err := connection .Start (); err != nil {
21+ t .Fatal (err )
22+ }
23+
2124 publisher := connection .NewPublisher ()
2225
2326 queueName := uuid .NewString ()
@@ -75,7 +78,10 @@ func TestConsumerPublisherMetrics(t *testing.T) {
7578
7679 t .Run ("NACK event" , func (t * testing.T ) {
7780 connection := bunnify .NewConnection ()
78- connection .Start ()
81+ if err := connection .Start (); err != nil {
82+ t .Fatal (err )
83+ }
84+
7985 publisher := connection .NewPublisher ()
8086
8187 queueName := uuid .NewString ()
@@ -133,7 +139,9 @@ func TestConsumerPublisherMetrics(t *testing.T) {
133139 }
134140
135141 connection := bunnify .NewConnection ()
136- connection .Start ()
142+ if err := connection .Start (); err != nil {
143+ t .Fatal (err )
144+ }
137145
138146 queueName := uuid .NewString ()
139147 exchangeName := uuid .NewString ()
@@ -157,7 +165,9 @@ func TestConsumerPublisherMetrics(t *testing.T) {
157165 }
158166
159167 connection = bunnify .NewConnection ()
160- connection .Start ()
168+ if err := connection .Start (); err != nil {
169+ t .Fatal (err )
170+ }
161171
162172 // Register again but with other routing key
163173 // The existing binding on the AMQP instance still exists
0 commit comments