@@ -9,14 +9,13 @@ import (
99 "testing"
1010 "time"
1111
12+ "github.com/blokur/harego/v2"
1213 "github.com/blokur/testament"
1314 "github.com/google/go-cmp/cmp"
1415 amqp "github.com/rabbitmq/amqp091-go"
1516 "github.com/stretchr/testify/assert"
1617 "github.com/stretchr/testify/require"
1718 "github.com/testcontainers/testcontainers-go"
18-
19- "github.com/blokur/harego/v2"
2019)
2120
2221func TestIntegConsumer (t * testing.T ) {
@@ -160,7 +159,7 @@ func testIntegConsumerConsumeNack(t *testing.T) {
160159 )
161160
162161 err = retryConfig .Do (func () error {
163- _ , addr = getContainer (t , t .Context ())
162+ _ , addr = getContainer (t .Context (), t )
164163 return nil
165164 }, func () error {
166165 cons1 , err = harego .NewConsumer (harego .URLConnector (addr ),
@@ -370,7 +369,7 @@ func testIntegConsumerSeparatedConsumePublish(t *testing.T) {
370369 var err error
371370
372371 err = retryConfig .Do (func () error {
373- _ , addr = getContainer (t , t .Context ())
372+ _ , addr = getContainer (t .Context (), t )
374373 return nil
375374 }, func () error {
376375 _ , pub1 , err = getConsumerPublisherWithAddr (t , addr , exchange1 , "" )
@@ -480,7 +479,7 @@ func testIntegConsumerUseSameQueue(t *testing.T) {
480479 )
481480
482481 err = retryConfig .Do (func () error {
483- _ , addr = getContainer (t , t .Context ())
482+ _ , addr = getContainer (t .Context (), t )
484483 return nil
485484 }, func () error {
486485 _ , pub1 , err = getConsumerPublisherWithAddr (t , addr , exchange1 , queueName )
@@ -567,7 +566,7 @@ func testIntegConsumerPublishWorkers(t *testing.T) {
567566 )
568567
569568 err = retryConfig .Do (func () error {
570- _ , addr = getContainer (t , t .Context ())
569+ _ , addr = getContainer (t .Context (), t )
571570 return nil
572571 }, func () error {
573572 _ , pub , err = getConsumerPublisherWithAddr (t , addr , exchange1 , queueName ,
@@ -651,7 +650,7 @@ func testIntegConsumerReconnect(t *testing.T) {
651650 )
652651
653652 err = retryConfig .Do (func () error {
654- container , addr = getContainer (t , t .Context ())
653+ container , addr = getContainer (t .Context (), t )
655654 return nil
656655 }, func () error {
657656 pub , err = harego .NewPublisher (harego .URLConnector (addr ),
@@ -688,7 +687,7 @@ func testIntegConsumerReconnect(t *testing.T) {
688687
689688 go func () {
690689 <- restart
691- restartRabbitMQ (t , t .Context (), container )
690+ restartRabbitMQ (t .Context (), t , container )
692691 }()
693692
694693 wGroup .Add (1 )
0 commit comments