File tree Expand file tree Collapse file tree
ActiveMQ.Artemis.Client.IntegrationTests
ActiveMQ.Artemis.Client.UnitTests/AutoRecovering Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ await topologyManager.CreateQueueAsync(new QueueConfiguration
132132 await queue2Consumer1 . DisposeAsync ( ) ;
133133 await queue2Consumer2 . DisposeAsync ( ) ;
134134
135+ // give broker time to clean up the resources
136+ await Task . Delay ( 100 ) ;
137+
135138 await using var newQueue1Consumer1 = await connection2 . CreateConsumerAsync ( address , queue1 ) ;
136139 await using var newQueue1Consumer2 = await connection2 . CreateConsumerAsync ( address , queue1 ) ;
137140 await using var newQueue2Consumer1 = await connection2 . CreateConsumerAsync ( address , queue2 ) ;
Original file line number Diff line number Diff line change @@ -38,18 +38,18 @@ public async Task Should_be_able_to_receive_messages_when_connection_restored()
3838 [ Fact ]
3939 public async Task Should_be_able_to_receive_message_when_connection_restored_after_receive_called ( )
4040 {
41- var endpoint = GetUniqueEndpoint ( ) ;
42- var host1 = CreateOpenedContainerHost ( endpoint ) ;
41+ var host1 = CreateOpenedContainerHost ( ) ;
42+ var host2 = CreateContainerHost ( ) ;
4343
44- var connection = await CreateConnection ( endpoint ) ;
44+ var connection = await CreateConnection ( new [ ] { host1 . Endpoint , host2 . Endpoint } ) ;
4545 var consumer = await connection . CreateConsumerAsync ( "a1" , RoutingType . Anycast ) ;
4646
4747 var cts = new CancellationTokenSource ( Timeout ) ;
4848 var receiveTask = consumer . ReceiveAsync ( cts . Token ) ;
4949
50+ host2 . Open ( ) ;
5051 host1 . Dispose ( ) ;
5152
52- var host2 = CreateOpenedContainerHost ( endpoint ) ;
5353 var messageSource = host2 . CreateMessageSource ( "a1" ) ;
5454 messageSource . Enqueue ( new Message ( "foo" ) ) ;
5555
You can’t perform that action at this time.
0 commit comments