Skip to content

Commit

Permalink
* Fix test failures due to not passing _consumerDispatchConcurrency
Browse files Browse the repository at this point in the history
… correctly to `CreateChannelOptions`
  • Loading branch information
lukebakken committed Oct 23, 2024
1 parent cffe0fd commit f28310a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions projects/Test/Common/IntegrationFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public abstract class IntegrationFixture : IAsyncLifetime

protected ConnectionFactory _connFactory;
protected IConnection _conn;
protected IChannel _channel;

protected static readonly CreateChannelOptions _createChannelOptions = new(publisherConfirmationsEnabled: true,
protected CreateChannelOptions _createChannelOptions = new(publisherConfirmationsEnabled: true,
publisherConfirmationTrackingEnabled: true);
protected IChannel _channel;

protected static readonly Encoding _encoding = new UTF8Encoding();
protected static readonly int _processorCount = Environment.ProcessorCount;
Expand Down Expand Up @@ -156,6 +156,8 @@ public virtual async Task InitializeAsync()

if (_openChannel)
{
_createChannelOptions = new CreateChannelOptions(publisherConfirmationsEnabled: true,
publisherConfirmationTrackingEnabled: true, consumerDispatchConcurrency: _consumerDispatchConcurrency);
_channel = await _conn.CreateChannelAsync(_createChannelOptions);
}

Expand Down
2 changes: 1 addition & 1 deletion projects/Test/Common/TestConnectionRecoveryBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public virtual Task PostHandleDeliveryAsync(ulong deliveryTag,
}
}

protected static async Task<bool> SendAndConsumeMessageAsync(IConnection conn, string queue, string exchange, string routingKey)
protected async Task<bool> SendAndConsumeMessageAsync(IConnection conn, string queue, string exchange, string routingKey)
{
using (IChannel ch = await conn.CreateChannelAsync(_createChannelOptions))
{
Expand Down

0 comments on commit f28310a

Please sign in to comment.