-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
1 parent
d98eb66
commit d53af72
Showing
4 changed files
with
173 additions
and
105 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/Persistence/SqlServerTests/Persistence/deadletter_admin_compliance.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,36 @@ | ||
using IntegrationTests; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
using Wolverine; | ||
using Wolverine.ComplianceTests; | ||
using Wolverine.Persistence.Durability; | ||
using Wolverine.RDBMS; | ||
using Wolverine.SqlServer; | ||
using Xunit.Abstractions; | ||
|
||
namespace SqlServerTests.Persistence; | ||
|
||
public class deadletter_admin_compliance : DeadLetterAdminCompliance | ||
{ | ||
public deadletter_admin_compliance(ITestOutputHelper output) : base(output) | ||
{ | ||
} | ||
|
||
public override async Task<IHost> BuildCleanHost() | ||
{ | ||
var host = await Host.CreateDefaultBuilder() | ||
.UseWolverine(opts => | ||
{ | ||
opts.PersistMessagesWithSqlServer(Servers.SqlServerConnectionString, "dlq5"); | ||
|
||
// This setting changes the internal message storage identity | ||
opts.Durability.DeadLetterQueueExpirationEnabled = true; | ||
}) | ||
.StartAsync(); | ||
|
||
var persistence = (IMessageDatabase)host.Services.GetRequiredService<IMessageStore>(); | ||
await persistence.Admin.ClearAllAsync(); | ||
|
||
return host; | ||
} | ||
} |
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
Oops, something went wrong.