Skip to content

Commit

Permalink
Just verifying again that Wolverine isn't erroneously creating the bu…
Browse files Browse the repository at this point in the history
…ilt in DLQ
  • Loading branch information
jeremydmiller committed Feb 22, 2024
1 parent 3bdb5a0 commit 26f6df6
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using IntegrationTests;
using JasperFx.Core.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shouldly;
using Wolverine.AmazonSqs.Internal;
using Wolverine.Postgresql;
using Wolverine.Runtime;

namespace Wolverine.AmazonSqs.Tests.Bugs;
Expand Down Expand Up @@ -57,6 +59,28 @@ public async Task do_not_use_default_dlq_when_all_listener_dlqs_are_configured()
transport.Queues.Contains(AmazonSqsTransport.DeadLetterQueueName)
.ShouldBeFalse();
}

[Fact]
public async Task no_seriously_do_not_create_dlq()
{
using var host = await Host.CreateDefaultBuilder()
.UseWolverine(options =>
{
options.PersistMessagesWithPostgresql(Servers.PostgresConnectionString);
options.UseAmazonSqsTransportLocally();

options.Durability.Mode = DurabilityMode.Solo;

options.ListenToSqsQueue("product-created")
.ConfigureDeadLetterQueue("product-created-error");
}).StartAsync();

var transport = host.Services.GetRequiredService<IWolverineRuntime>().As<WolverineRuntime>()
.Options.Transports.GetOrCreate<AmazonSqsTransport>();

transport.Queues.Contains(AmazonSqsTransport.DeadLetterQueueName)
.ShouldBeFalse();
}
}

public record ProductCreated;

0 comments on commit 26f6df6

Please sign in to comment.