-
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.
Merge pull request #1422 from Particular/disable-delayed-infra
Add a constructor parameter to not create the delayed delivery infrastructure
- Loading branch information
Showing
6 changed files
with
82 additions
and
9 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
26 changes: 26 additions & 0 deletions
26
src/NServiceBus.Transport.RabbitMQ.TransportTests/When_delayed_delivery_is_disabled.cs
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,26 @@ | ||
namespace NServiceBus.Transport.RabbitMQ.TransportTests | ||
{ | ||
using System; | ||
using System.Threading.Tasks; | ||
using DelayedDelivery; | ||
using NServiceBus.TransportTests; | ||
using NUnit.Framework; | ||
|
||
public class When_delayed_delivery_is_disabled : NServiceBusTransportTest | ||
{ | ||
[TestCase(TransportTransactionMode.ReceiveOnly)] | ||
public async Task Should_throw_when_sending(TransportTransactionMode transactionMode) | ||
{ | ||
await StartPump( | ||
(context, _) => Task.FromResult(0), | ||
(_, __) => Task.FromResult(ErrorHandleResult.RetryRequired), | ||
transactionMode); | ||
|
||
Assert.ThrowsAsync<Exception>(async () => | ||
{ | ||
var dispatchProperties = new DispatchProperties { DelayDeliveryWith = new DelayDeliveryWith(TimeSpan.FromHours(1)) }; | ||
await SendMessage(InputQueueName, [], null, dispatchProperties); | ||
}); | ||
} | ||
} | ||
} |
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