@@ -12,6 +12,7 @@ import (
1212 "time"
1313
1414 "github.com/Azure/azure-sdk-for-go/sdk/internal/log"
15+ "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/amqpwrap"
1516 "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/exported"
1617 "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/test"
1718 "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/utils"
@@ -77,7 +78,7 @@ func TestAMQPLinksBasic(t *testing.T) {
7778 links := NewAMQPLinks (NewAMQPLinksArgs {
7879 NS : ns ,
7980 EntityPath : entityPath ,
80- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
81+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
8182 return newLinksForAMQPLinksTest (entityPath , session )
8283 },
8384 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -112,7 +113,7 @@ func TestAMQPLinksLive(t *testing.T) {
112113 links := NewAMQPLinks (NewAMQPLinksArgs {
113114 NS : ns ,
114115 EntityPath : entityPath ,
115- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
116+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
116117 createLinksCalled ++
117118 return newLinksForAMQPLinksTest (entityPath , session )
118119 },
@@ -185,7 +186,7 @@ func TestAMQPLinksLiveRecoverLink(t *testing.T) {
185186 links := NewAMQPLinks (NewAMQPLinksArgs {
186187 NS : ns ,
187188 EntityPath : entityPath ,
188- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
189+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
189190 createLinksCalled ++
190191 return newLinksForAMQPLinksTest (entityPath , session )
191192 },
@@ -223,7 +224,7 @@ func TestAMQPLinksLiveRace(t *testing.T) {
223224 links := NewAMQPLinks (NewAMQPLinksArgs {
224225 NS : ns ,
225226 EntityPath : entityPath ,
226- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
227+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
227228 createLinksCalled ++
228229 return newLinksForAMQPLinksTest (entityPath , session )
229230 },
@@ -275,7 +276,7 @@ func TestAMQPLinksLiveRaceLink(t *testing.T) {
275276 links := NewAMQPLinks (NewAMQPLinksArgs {
276277 NS : ns ,
277278 EntityPath : entityPath ,
278- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
279+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
279280 createLinksCalled ++
280281 return newLinksForAMQPLinksTest (entityPath , session )
281282 },
@@ -319,7 +320,7 @@ func TestAMQPLinksRetry(t *testing.T) {
319320 links := NewAMQPLinks (NewAMQPLinksArgs {
320321 NS : ns ,
321322 EntityPath : entityPath ,
322- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
323+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
323324 createLinksCalled ++
324325 return newLinksForAMQPLinksTest (entityPath , session )
325326 },
@@ -361,7 +362,7 @@ func TestAMQPLinksMultipleWithSameConnection(t *testing.T) {
361362 links := NewAMQPLinks (NewAMQPLinksArgs {
362363 NS : ns ,
363364 EntityPath : entityPath ,
364- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
365+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
365366 createLinksCalled ++
366367 return newLinksForAMQPLinksTest (entityPath , session )
367368 },
@@ -377,7 +378,7 @@ func TestAMQPLinksMultipleWithSameConnection(t *testing.T) {
377378 links2 := NewAMQPLinks (NewAMQPLinksArgs {
378379 NS : ns ,
379380 EntityPath : entityPath ,
380- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
381+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
381382 createLinksCalled2 ++
382383 return newLinksForAMQPLinksTest (entityPath , session )
383384 },
@@ -456,7 +457,7 @@ func TestAMQPLinksCloseIfNeeded(t *testing.T) {
456457 links := NewAMQPLinks (NewAMQPLinksArgs {
457458 NS : ns ,
458459 EntityPath : "entityPath" ,
459- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
460+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
460461 return sender , receiver , nil
461462 },
462463 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -486,7 +487,7 @@ func TestAMQPLinksCloseIfNeeded(t *testing.T) {
486487 links := NewAMQPLinks (NewAMQPLinksArgs {
487488 NS : ns ,
488489 EntityPath : "entityPath" ,
489- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
490+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
490491 return sender , receiver , nil
491492 },
492493 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -515,7 +516,7 @@ func TestAMQPLinksCloseIfNeeded(t *testing.T) {
515516 links := NewAMQPLinks (NewAMQPLinksArgs {
516517 NS : ns ,
517518 EntityPath : "entityPath" ,
518- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
519+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
519520 return sender , receiver , nil
520521 },
521522 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -544,7 +545,7 @@ func TestAMQPLinksCloseIfNeeded(t *testing.T) {
544545 links := NewAMQPLinks (NewAMQPLinksArgs {
545546 NS : ns ,
546547 EntityPath : "entityPath" ,
547- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
548+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
548549 return sender , receiver , nil
549550 },
550551 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -607,7 +608,7 @@ func TestAMQPLinksRetriesUnit(t *testing.T) {
607608 links := NewAMQPLinks (NewAMQPLinksArgs {
608609 NS : ns ,
609610 EntityPath : "entityPath" ,
610- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
611+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
611612 return sender , receiver , nil
612613 },
613614 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -651,7 +652,7 @@ func TestAMQPLinks_Logging(t *testing.T) {
651652 links := NewAMQPLinks (NewAMQPLinksArgs {
652653 NS : ns ,
653654 EntityPath : "entityPath" ,
654- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
655+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
655656 return nil , receiver , nil
656657 },
657658 GetRecoveryKindFunc : GetRecoveryKind ,
@@ -684,7 +685,7 @@ func TestAMQPLinks_Logging(t *testing.T) {
684685 links := NewAMQPLinks (NewAMQPLinksArgs {
685686 NS : ns ,
686687 EntityPath : "entityPath" ,
687- CreateLinkFunc : func (ctx context.Context , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
688+ CreateLinkFunc : func (ctx context.Context , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
688689 return nil , receiver , nil
689690 }, GetRecoveryKindFunc : GetRecoveryKind ,
690691 })
@@ -710,7 +711,7 @@ func TestAMQPLinks_Logging(t *testing.T) {
710711 })
711712}
712713
713- func newLinksForAMQPLinksTest (entityPath string , session AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
714+ func newLinksForAMQPLinksTest (entityPath string , session amqpwrap. AMQPSession ) (AMQPSenderCloser , AMQPReceiverCloser , error ) {
714715 receiveMode := amqp .ModeSecond
715716
716717 opts := []amqp.LinkOption {
0 commit comments