Add management connection string API and tests #2276
Annotations
9 errors
Should_connect_to_management_api_with_broker_credentials:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L335
System.Net.Http.HttpRequestException : No connection could be made because the target machine actively refused it. (localhost:15672)
----> System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it.
|
Should_not_throw_when_DoNotUseManagementClient_is_enabled_and_management_connection_is_invalid:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L368
RabbitMQ.Client.Exceptions.BrokerUnreachableException : None of the specified endpoints were reachable
----> System.AggregateException : One or more errors occurred. (Connection failed, host 127.0.0.1:5672)
----> RabbitMQ.Client.Exceptions.ConnectFailureException : Connection failed, host 127.0.0.1:5672
----> System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it.
|
Should_set_default_port_values_for_broker_and_management_connections:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L350
System.Net.Http.HttpRequestException : No connection could be made because the target machine actively refused it. (localhost:15672)
----> System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it.
|
Should_throw_on_invalid_broker_connection_string:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L292
Assert.That(caughtException, expression)
Expected: <RabbitMQ.Client.Exceptions.BrokerUnreachableException>
But was: <System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:15672)
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at NServiceBus.Transport.RabbitMQ.Administration.ManagementClient.ManagementClient.GetOverview(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/ManagementClient/ManagementClient.cs:line 63
at NServiceBus.Transport.RabbitMQ.Administration.BrokerVerifier.Initialize(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/BrokerVerifier.cs:line 27
at NServiceBus.RabbitMQTransport.Initialize(HostSettings hostSettings, ReceiveSettings[] receivers, String[] sendingAddresses, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs:line 236
at NServiceBus.Transport.RabbitMQ.Tests.ConnectionString.ConnectionConfigurationTests.<>c__DisplayClass37_0.<<Should_throw_on_invalid_broker_connection_string>b__0>d.MoveNext() in /_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs:line 292
--- End of stack trace from previous location ---
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Assert.ThrowsAsync(IResolveConstraint expression, AsyncTestDelegate code, String message, Object[] args)>
|
Should_throw_on_invalid_legacy_broker_connection_string:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L324
Assert.That(caughtException, expression)
Expected: <RabbitMQ.Client.Exceptions.BrokerUnreachableException>
But was: <System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:15672)
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at NServiceBus.Transport.RabbitMQ.Administration.ManagementClient.ManagementClient.GetOverview(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/ManagementClient/ManagementClient.cs:line 63
at NServiceBus.Transport.RabbitMQ.Administration.BrokerVerifier.Initialize(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/BrokerVerifier.cs:line 27
at NServiceBus.RabbitMQTransport.Initialize(HostSettings hostSettings, ReceiveSettings[] receivers, String[] sendingAddresses, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs:line 236
at NServiceBus.Transport.RabbitMQ.Tests.ConnectionString.ConnectionConfigurationTests.<>c__DisplayClass39_0.<<Should_throw_on_invalid_legacy_broker_connection_string>b__0>d.MoveNext() in /_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs:line 324
--- End of stack trace from previous location ---
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Assert.ThrowsAsync(IResolveConstraint expression, AsyncTestDelegate code, String message, Object[] args)>
|
Should_throw_on_invalid_legacy_management_connection_string:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L308
Assert.That(caughtException, expression)
Expected: <System.InvalidOperationException>
But was: <System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:15672)
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at NServiceBus.Transport.RabbitMQ.Administration.ManagementClient.ManagementClient.GetOverview(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/ManagementClient/ManagementClient.cs:line 63
at NServiceBus.Transport.RabbitMQ.Administration.BrokerVerifier.Initialize(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/BrokerVerifier.cs:line 27
at NServiceBus.RabbitMQTransport.Initialize(HostSettings hostSettings, ReceiveSettings[] receivers, String[] sendingAddresses, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs:line 236
at NServiceBus.Transport.RabbitMQ.Tests.ConnectionString.ConnectionConfigurationTests.<>c__DisplayClass38_0.<<Should_throw_on_invalid_legacy_management_connection_string>b__0>d.MoveNext() in /_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs:line 308
--- End of stack trace from previous location ---
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Assert.ThrowsAsync(IResolveConstraint expression, AsyncTestDelegate code, String message, Object[] args)>
|
Should_throw_on_invalid_management_connection_string:
_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs#L282
Assert.That(caughtException, expression)
Expected: <System.InvalidOperationException>
But was: <System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:15672)
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at NServiceBus.Transport.RabbitMQ.Administration.ManagementClient.ManagementClient.GetOverview(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/ManagementClient/ManagementClient.cs:line 63
at NServiceBus.Transport.RabbitMQ.Administration.BrokerVerifier.Initialize(CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/Administration/BrokerVerifier.cs:line 27
at NServiceBus.RabbitMQTransport.Initialize(HostSettings hostSettings, ReceiveSettings[] receivers, String[] sendingAddresses, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs:line 236
at NServiceBus.Transport.RabbitMQ.Tests.ConnectionString.ConnectionConfigurationTests.<>c__DisplayClass36_0.<<Should_throw_on_invalid_management_connection_string>b__0>d.MoveNext() in /_/src/NServiceBus.Transport.RabbitMQ.Tests/Connection/ConnectionConfigurationTests.cs:line 282
--- End of stack trace from previous location ---
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Assert.ThrowsAsync(IResolveConstraint expression, AsyncTestDelegate code, String message, Object[] args)>
|
Windows
Exit code = 1
|
Windows
Process completed with exit code 1.
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
NuGet packages
Expired
|
1.62 MB |
|