-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensuring that wolverine never tries to route agent or internal messag…
…es through rabbit or any other external transport. Closes GH-710
- Loading branch information
1 parent
ed0ce33
commit 8f2b4cc
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
...verine.RabbitMQ.Tests/Bugs/Bug_710_rabbit_exchange_errorneously_used_for_system_queues.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,40 @@ | ||
using System.Diagnostics; | ||
using System.Runtime.CompilerServices; | ||
using IntegrationTests; | ||
using Marten; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
using Shouldly; | ||
using TestMessages; | ||
using Wolverine.Marten; | ||
using Wolverine.Runtime; | ||
using Xunit; | ||
|
||
namespace Wolverine.RabbitMQ.Tests.Bugs; | ||
|
||
public class Bug_710_rabbit_exchange_errorneously_used_for_system_queues : RabbitMQContext | ||
{ | ||
[Fact] | ||
public async Task start_system_with_declared_exchange() | ||
{ | ||
using var host = await Host.CreateDefaultBuilder() | ||
.UseWolverine(opts => | ||
{ | ||
opts.UseRabbitMq() | ||
.DeclareExchange("NotControlExchange", ex => | ||
{ | ||
ex.BindQueue("NotControlQueue"); | ||
}) | ||
.AutoProvision(); | ||
|
||
opts.PublishMessage<Message1>().ToRabbitExchange("NotControlExchange"); | ||
|
||
opts.Services.AddMarten(Servers.PostgresConnectionString) | ||
.IntegrateWithWolverine(); | ||
}).StartAsync(); | ||
|
||
var options = host.Services.GetRequiredService<IWolverineRuntime>().Options; | ||
|
||
options.Transports.NodeControlEndpoint.Uri.Scheme.ShouldBe("dbcontrol"); | ||
} | ||
} |
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