21 lines
700 B
C#
21 lines
700 B
C#
using FluentAssertions;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
[Collection("Integration")]
|
|
public class DlqRoutingTests
|
|
{
|
|
private readonly ApiFixture _fixture;
|
|
|
|
public DlqRoutingTests(ApiFixture fixture) => _fixture = fixture;
|
|
|
|
[Fact]
|
|
public async Task PagingDlq_TtlDeadLettersToEscalationQueue()
|
|
{
|
|
using var scope = _fixture.Services.CreateScope();
|
|
var opts = scope.ServiceProvider.GetRequiredService<Microsoft.Extensions.Options.IOptions<RabbitMqOptions>>();
|
|
|
|
var routed = await DlqRoutingProbe.DlqTtlRoutesToEscalationQueueAsync(opts);
|
|
routed.Should().BeTrue("DLQ x-message-ttl should dead-letter to alerts.escalation.queue");
|
|
}
|
|
}
|