Skip to content

Commit

Permalink
Update ManagementConnection tests to use a separate managementConnect…
Browse files Browse the repository at this point in the history
…ionConfiguration
  • Loading branch information
TravisNickels committed Dec 5, 2024
1 parent 2d02ac3 commit 78161c8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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}";
Expand All @@ -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);

Expand All @@ -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();

Expand Down

0 comments on commit 78161c8

Please sign in to comment.