-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
189 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace NServiceBus.Transports.RabbitMQ.Tests | ||
{ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using NUnit.Framework; | ||
|
||
[TestFixture] | ||
public class When_stopping_endpoint : RabbitMqContext | ||
{ | ||
[SetUp] | ||
public new void SetUp() | ||
{ | ||
MakeSureQueueAndExchangeExists(ReceiverQueue); | ||
} | ||
|
||
[Test, Explicit] | ||
public void Should__gracefully_shutdown() | ||
{ | ||
dequeueStrategy.Stop(); | ||
|
||
var address = Address.Parse(ReceiverQueue); | ||
|
||
Parallel.For(0, 2000, i => | ||
sender.Send(new TransportMessage(), address)); | ||
|
||
dequeueStrategy.PurgeOnStartup = false; | ||
dequeueStrategy.Start(50); | ||
Thread.Sleep(10); | ||
dequeueStrategy.Stop(); | ||
connectionManager.Dispose(); | ||
} | ||
} | ||
} |
Oops, something went wrong.