File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
SlimMessageBus.Host.AmazonSQS.Test Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 44 <Import Project =" Common.NuGet.Properties.xml" />
55
66 <PropertyGroup >
7- <Version >3.0.1 </Version >
7+ <Version >3.0.2 </Version >
88 </PropertyGroup >
99
1010</Project >
Original file line number Diff line number Diff line change @@ -49,10 +49,17 @@ void AdditionalSqsSetup(SqsMessageBusSettings cfg)
4949 var r = await client . ListQueuesAsync ( QueueNamePrefix ) ;
5050 foreach ( var queueUrl in r . QueueUrls )
5151 {
52- var tagsResponse = await client . ListQueueTagsAsync ( new ListQueueTagsRequest { QueueUrl = queueUrl } ) ;
53- if ( ! tagsResponse . Tags . TryGetValue ( CreatedDateTag , out var createdDateTag ) || createdDateTag != today )
52+ try
5453 {
55- await client . DeleteQueueAsync ( queueUrl ) ;
54+ var tagsResponse = await client . ListQueueTagsAsync ( new ListQueueTagsRequest { QueueUrl = queueUrl } ) ;
55+ if ( ! tagsResponse . Tags . TryGetValue ( CreatedDateTag , out var createdDateTag ) || createdDateTag != today )
56+ {
57+ await client . DeleteQueueAsync ( queueUrl ) ;
58+ }
59+ }
60+ catch ( QueueDoesNotExistException )
61+ {
62+ // ignore, other tests might already have deleted the queue
5663 }
5764 }
5865 await provision ( ) ;
Original file line number Diff line number Diff line change @@ -638,15 +638,17 @@ public async Task When_Start_Given_ConcurrentCalls_Then_ItOnlyStartsConsumersOnc
638638 // trigger lazy bus creation here ahead of the Tasks
639639 var bus = Bus ;
640640
641+ await bus . Start ( ) ;
642+
641643 // act
642644 for ( var i = 0 ; i < 10 ; i ++ )
643645 {
644- await Task . WhenAll ( Enumerable . Range ( 0 , 1000 ) . Select ( x => bus . Start ( ) ) . ToList ( ) ) ;
646+ await Task . WhenAll ( Enumerable . Range ( 0 , 10000 ) . Select ( x => bus . Start ( ) ) . AsParallel ( ) ) ;
645647 }
646648
647649 // assert
648- bus . _startedCount . Should ( ) . Be ( 1 ) ;
649650 bus . _stoppedCount . Should ( ) . Be ( 0 ) ;
651+ bus . _startedCount . Should ( ) . Be ( 1 ) ;
650652 }
651653
652654 [ Fact ]
@@ -668,8 +670,8 @@ public async Task When_Stop_Given_ConcurrentCalls_Then_ItOnlyStopsConsumersOnce(
668670 }
669671
670672 // assert
671- bus . _startedCount . Should ( ) . Be ( 1 ) ;
672673 bus . _stoppedCount . Should ( ) . Be ( 1 ) ;
674+ bus . _startedCount . Should ( ) . Be ( 1 ) ;
673675 }
674676
675677 public class ProduceResponseTests
You can’t perform that action at this time.
0 commit comments