File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,18 @@ public void testRoundRobin()
221
221
222
222
final Map <String , Integer > counts =
223
223
Collections .synchronizedMap (new HashMap <String , Integer >());
224
+ final String [] nextTag = new String [] { null };
224
225
225
226
QueueingConsumer c = new QueueingConsumer (channel ) {
226
227
@ Override public void handleDelivery (String consumerTag ,
227
228
Envelope envelope ,
228
229
AMQP .BasicProperties properties ,
229
230
byte [] body )
230
231
throws IOException {
232
+ String otherConsumerTag = "c1" .equals (consumerTag ) ? "c2" : "c1" ;
233
+ if (null != nextTag [0 ])
234
+ assertEquals (consumerTag , nextTag [0 ]);
235
+ nextTag [0 ] = otherConsumerTag ;
231
236
counts .put (consumerTag , counts .get (consumerTag ) + 1 );
232
237
super .handleDelivery (consumerTag , envelope ,
233
238
properties , body );
You can’t perform that action at this time.
0 commit comments