1818import com .rabbitmq .client .ChannelContinuationTimeoutException ;
1919import com .rabbitmq .client .Command ;
2020import com .rabbitmq .client .Method ;
21+ import com .rabbitmq .client .TrafficListener ;
2122import com .rabbitmq .client .impl .AMQChannel ;
2223import com .rabbitmq .client .impl .AMQCommand ;
2324import com .rabbitmq .client .impl .AMQConnection ;
@@ -52,6 +53,7 @@ public class AMQChannelTest {
5253 int rpcTimeout = 100 ;
5354 AMQConnection connection = mock (AMQConnection .class );
5455 when (connection .getChannelRpcTimeout ()).thenReturn (rpcTimeout );
56+ when (connection .getTrafficListener ()).thenReturn (TrafficListener .NO_OP );
5557
5658 DummyAmqChannel channel = new DummyAmqChannel (connection , 1 );
5759 Method method = new AMQImpl .Queue .Declare .Builder ()
@@ -78,6 +80,7 @@ public class AMQChannelTest {
7880 int rpcTimeout = 1000 ;
7981 AMQConnection connection = mock (AMQConnection .class );
8082 when (connection .getChannelRpcTimeout ()).thenReturn (rpcTimeout );
83+ when (connection .getTrafficListener ()).thenReturn (TrafficListener .NO_OP );
8184
8285 final DummyAmqChannel channel = new DummyAmqChannel (connection , 1 );
8386 Method method = new AMQImpl .Queue .Declare .Builder ()
@@ -111,6 +114,7 @@ public void testRpcTimeoutReplyComesDuringNexRpc() throws Exception {
111114 AMQConnection connection = mock (AMQConnection .class );
112115 when (connection .getChannelRpcTimeout ()).thenReturn (rpcTimeout );
113116 when (connection .willCheckRpcResponseType ()).thenReturn (Boolean .TRUE );
117+ when (connection .getTrafficListener ()).thenReturn (TrafficListener .NO_OP );
114118
115119 final DummyAmqChannel channel = new DummyAmqChannel (connection , 1 );
116120 Method method = new AMQImpl .Queue .Declare .Builder ()
0 commit comments