@@ -54,7 +54,7 @@ public TestAsyncConsumer(ITestOutputHelper output)
54
54
public async Task TestBasicRoundtripConcurrent ( )
55
55
{
56
56
AddCallbackExceptionHandlers ( ) ;
57
- _channel . DefaultConsumer = new DefaultAsyncConsumer ( "_channel," , _output ) ;
57
+ _channel . DefaultConsumer = new DefaultAsyncConsumer ( _channel , "_channel," , _output ) ;
58
58
59
59
QueueDeclareOk q = await _channel . QueueDeclareAsync ( ) ;
60
60
@@ -147,7 +147,7 @@ public async Task TestBasicRoundtripConcurrent()
147
147
public async Task TestBasicRoundtripConcurrentManyMessages ( )
148
148
{
149
149
AddCallbackExceptionHandlers ( ) ;
150
- _channel . DefaultConsumer = new DefaultAsyncConsumer ( "_channel," , _output ) ;
150
+ _channel . DefaultConsumer = new DefaultAsyncConsumer ( _channel , "_channel," , _output ) ;
151
151
152
152
const int publish_total = 4096 ;
153
153
const int length = 512 ;
@@ -205,7 +205,8 @@ public async Task TestBasicRoundtripConcurrentManyMessages()
205
205
using ( IChannel publishChannel = await publishConn . CreateChannelAsync ( ) )
206
206
{
207
207
AddCallbackExceptionHandlers ( publishConn , publishChannel ) ;
208
- publishChannel . DefaultConsumer = new DefaultAsyncConsumer ( "publishChannel," , _output ) ;
208
+ publishChannel . DefaultConsumer = new DefaultAsyncConsumer ( publishChannel ,
209
+ "publishChannel," , _output ) ;
209
210
publishChannel . ChannelShutdown += ( o , ea ) =>
210
211
{
211
212
HandleChannelShutdown ( publishChannel , ea , ( args ) =>
@@ -247,7 +248,8 @@ public async Task TestBasicRoundtripConcurrentManyMessages()
247
248
using ( IChannel consumeChannel = await consumeConn . CreateChannelAsync ( ) )
248
249
{
249
250
AddCallbackExceptionHandlers ( consumeConn , consumeChannel ) ;
250
- consumeChannel . DefaultConsumer = new DefaultAsyncConsumer ( "consumeChannel," , _output ) ;
251
+ consumeChannel . DefaultConsumer = new DefaultAsyncConsumer ( consumeChannel ,
252
+ "consumeChannel," , _output ) ;
251
253
consumeChannel . ChannelShutdown += ( o , ea ) =>
252
254
{
253
255
HandleChannelShutdown ( consumeChannel , ea , ( args ) =>
@@ -722,7 +724,8 @@ private class DefaultAsyncConsumer : AsyncDefaultBasicConsumer
722
724
private readonly string _logPrefix ;
723
725
private readonly ITestOutputHelper _output ;
724
726
725
- public DefaultAsyncConsumer ( string logPrefix , ITestOutputHelper output )
727
+ public DefaultAsyncConsumer ( IChannel channel , string logPrefix , ITestOutputHelper output )
728
+ : base ( channel )
726
729
{
727
730
_logPrefix = logPrefix ;
728
731
_output = output ;
0 commit comments