Skip to content

Commit 9ba9cf2

Browse files
committed
Fixed unit tests
1 parent fd4e242 commit 9ba9cf2

File tree

4 files changed

+204
-85
lines changed

4 files changed

+204
-85
lines changed

projects/RabbitMQ.Client/client/api/IRecordedConsumer.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ namespace RabbitMQ.Client
55
#nullable enable
66
public interface IRecordedConsumer
77
{
8-
IBasicConsumer Consumer { get; }
9-
108
string ConsumerTag { get; }
119

1210
string Queue { get; }

projects/RabbitMQ.Client/client/api/TopologyRecoveryExceptionHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ public Action<IRecordedBinding, Exception, IConnection> BindingRecoveryException
139139

140140
/// <summary>
141141
/// Retries, or otherwise handles, an exception thrown when attempting to recover a consumer.
142-
/// Is only called when the exception did not cause the consumer's channel to close.
143142
/// </summary>
144143
public Action<IRecordedConsumer, Exception, IConnection> ConsumerRecoveryExceptionHandler
145144
{

projects/Unit/APIApproval.Approve.verified.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ namespace RabbitMQ.Client
145145
public string Password { get; }
146146
public System.TimeSpan RequestedConnectionTimeout { get; }
147147
public bool TopologyRecoveryEnabled { get; }
148+
public RabbitMQ.Client.TopologyRecoveryExceptionHandler TopologyRecoveryExceptionHandler { get; }
149+
public RabbitMQ.Client.TopologyRecoveryFilter TopologyRecoveryFilter { get; }
148150
public string UserName { get; }
149151
public string VirtualHost { get; }
150152
}
@@ -184,6 +186,8 @@ namespace RabbitMQ.Client
184186
public System.TimeSpan SocketWriteTimeout { get; set; }
185187
public RabbitMQ.Client.SslOption Ssl { get; set; }
186188
public bool TopologyRecoveryEnabled { get; set; }
189+
public RabbitMQ.Client.TopologyRecoveryExceptionHandler TopologyRecoveryExceptionHandler { get; set; }
190+
public RabbitMQ.Client.TopologyRecoveryFilter TopologyRecoveryFilter { get; set; }
187191
public System.Uri Uri { get; set; }
188192
public string UserName { get; set; }
189193
public string VirtualHost { get; set; }
@@ -566,6 +570,38 @@ namespace RabbitMQ.Client
566570
bool IsTypePresent();
567571
bool IsUserIdPresent();
568572
}
573+
public interface IRecordedBinding
574+
{
575+
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
576+
string Destination { get; }
577+
string RoutingKey { get; }
578+
string Source { get; }
579+
}
580+
public interface IRecordedConsumer
581+
{
582+
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
583+
bool AutoAck { get; }
584+
string ConsumerTag { get; }
585+
bool Exclusive { get; }
586+
string Queue { get; }
587+
}
588+
public interface IRecordedExchange
589+
{
590+
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
591+
bool AutoDelete { get; }
592+
bool Durable { get; }
593+
string Name { get; }
594+
string Type { get; }
595+
}
596+
public interface IRecordedQueue
597+
{
598+
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
599+
bool AutoDelete { get; }
600+
bool Durable { get; }
601+
bool Exclusive { get; }
602+
bool IsServerNamed { get; }
603+
string Name { get; }
604+
}
569605
public interface IRecoverable
570606
{
571607
event System.EventHandler<System.EventArgs> Recovery;
@@ -689,6 +725,26 @@ namespace RabbitMQ.Client
689725
public string ServerName { get; set; }
690726
public System.Security.Authentication.SslProtocols Version { get; set; }
691727
}
728+
public class TopologyRecoveryExceptionHandler
729+
{
730+
public TopologyRecoveryExceptionHandler() { }
731+
public System.Func<RabbitMQ.Client.IRecordedBinding, System.Exception, bool> BindingRecoveryExceptionCondition { get; set; }
732+
public System.Action<RabbitMQ.Client.IRecordedBinding, System.Exception, RabbitMQ.Client.IConnection> BindingRecoveryExceptionHandler { get; set; }
733+
public System.Func<RabbitMQ.Client.IRecordedConsumer, System.Exception, bool> ConsumerRecoveryExceptionCondition { get; set; }
734+
public System.Action<RabbitMQ.Client.IRecordedConsumer, System.Exception, RabbitMQ.Client.IConnection> ConsumerRecoveryExceptionHandler { get; set; }
735+
public System.Func<RabbitMQ.Client.IRecordedExchange, System.Exception, bool> ExchangeRecoveryExceptionCondition { get; set; }
736+
public System.Action<RabbitMQ.Client.IRecordedExchange, System.Exception, RabbitMQ.Client.IConnection> ExchangeRecoveryExceptionHandler { get; set; }
737+
public System.Func<RabbitMQ.Client.IRecordedQueue, System.Exception, bool> QueueRecoveryExceptionCondition { get; set; }
738+
public System.Action<RabbitMQ.Client.IRecordedQueue, System.Exception, RabbitMQ.Client.IConnection> QueueRecoveryExceptionHandler { get; set; }
739+
}
740+
public class TopologyRecoveryFilter
741+
{
742+
public TopologyRecoveryFilter() { }
743+
public System.Func<RabbitMQ.Client.IRecordedBinding, bool> BindingFilter { get; set; }
744+
public System.Func<RabbitMQ.Client.IRecordedConsumer, bool> ConsumerFilter { get; set; }
745+
public System.Func<RabbitMQ.Client.IRecordedExchange, bool> ExchangeFilter { get; set; }
746+
public System.Func<RabbitMQ.Client.IRecordedQueue, bool> QueueFilter { get; set; }
747+
}
692748
}
693749
namespace RabbitMQ.Client.Events
694750
{

0 commit comments

Comments
 (0)