18
18
import com .rabbitmq .client .ChannelContinuationTimeoutException ;
19
19
import com .rabbitmq .client .Command ;
20
20
import com .rabbitmq .client .Method ;
21
+ import com .rabbitmq .client .TrafficListener ;
21
22
import com .rabbitmq .client .impl .AMQChannel ;
22
23
import com .rabbitmq .client .impl .AMQCommand ;
23
24
import com .rabbitmq .client .impl .AMQConnection ;
@@ -52,6 +53,7 @@ public class AMQChannelTest {
52
53
int rpcTimeout = 100 ;
53
54
AMQConnection connection = mock (AMQConnection .class );
54
55
when (connection .getChannelRpcTimeout ()).thenReturn (rpcTimeout );
56
+ when (connection .getTrafficListener ()).thenReturn (TrafficListener .NO_OP );
55
57
56
58
DummyAmqChannel channel = new DummyAmqChannel (connection , 1 );
57
59
Method method = new AMQImpl .Queue .Declare .Builder ()
@@ -78,6 +80,7 @@ public class AMQChannelTest {
78
80
int rpcTimeout = 1000 ;
79
81
AMQConnection connection = mock (AMQConnection .class );
80
82
when (connection .getChannelRpcTimeout ()).thenReturn (rpcTimeout );
83
+ when (connection .getTrafficListener ()).thenReturn (TrafficListener .NO_OP );
81
84
82
85
final DummyAmqChannel channel = new DummyAmqChannel (connection , 1 );
83
86
Method method = new AMQImpl .Queue .Declare .Builder ()
@@ -111,6 +114,7 @@ public void testRpcTimeoutReplyComesDuringNexRpc() throws Exception {
111
114
AMQConnection connection = mock (AMQConnection .class );
112
115
when (connection .getChannelRpcTimeout ()).thenReturn (rpcTimeout );
113
116
when (connection .willCheckRpcResponseType ()).thenReturn (Boolean .TRUE );
117
+ when (connection .getTrafficListener ()).thenReturn (TrafficListener .NO_OP );
114
118
115
119
final DummyAmqChannel channel = new DummyAmqChannel (connection , 1 );
116
120
Method method = new AMQImpl .Queue .Declare .Builder ()
0 commit comments