From 78161c8b30b29d3465c901ce0d71e6c9fd90c351 Mon Sep 17 00:00:00 2001 From: Travis Nickels Date: Wed, 4 Dec 2024 19:16:45 -0800 Subject: [PATCH] Update ManagementConnection tests to use a separate managementConnectionConfiguration --- .../When_connecting_to_the_rabbitmq_management_api.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ManagementConnection/When_connecting_to_the_rabbitmq_management_api.cs b/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ManagementConnection/When_connecting_to_the_rabbitmq_management_api.cs index 7436e8a21..027a6745e 100644 --- a/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ManagementConnection/When_connecting_to_the_rabbitmq_management_api.cs +++ b/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ManagementConnection/When_connecting_to_the_rabbitmq_management_api.cs @@ -1,6 +1,6 @@ #nullable enable -namespace NServiceBus.Transport.RabbitMQ.Tests.Connection.ManagementConnection +namespace NServiceBus.Transport.RabbitMQ.Tests.ManagementConnection { using System; using System.Collections.Generic; @@ -19,6 +19,7 @@ class When_connecting_to_the_rabbitmq_management_api { static readonly string connectionString = Environment.GetEnvironmentVariable("RabbitMQTransport_ConnectionString") ?? "host=localhost"; readonly ConnectionConfiguration connectionConfiguration = ConnectionConfiguration.Create(connectionString); + readonly ConnectionConfiguration managementConnectionConfiguration = ConnectionConfiguration.Create(connectionString, isManagementConnection: true); protected QueueType queueType = QueueType.Quorum; protected string ReceiverQueue => GetTestQueueName("ManagementAPITestQueue"); protected string GetTestQueueName(string queueName) => $"{queueName}-{queueType}"; @@ -44,7 +45,7 @@ public async Task SetUp() [Test] public async Task GetQueue_Should_Return_Queue_Information_When_Exists() { - var client = new ManagementClient(connectionConfiguration); + var client = new ManagementClient(managementConnectionConfiguration); var response = await client.GetQueue(ReceiverQueue); @@ -59,7 +60,7 @@ public async Task GetQueue_Should_Return_Queue_Information_When_Exists() [Test] public async Task GetOverview_Should_Return_Broker_Information_When_Exists() { - var client = new ManagementClient(connectionConfiguration); + var client = new ManagementClient(managementConnectionConfiguration); var response = await client.GetOverview();