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()
221221
222222 final Map <String , Integer > counts =
223223 Collections .synchronizedMap (new HashMap <String , Integer >());
224+ final String [] nextTag = new String [] { null };
224225
225226 QueueingConsumer c = new QueueingConsumer (channel ) {
226227 @ Override public void handleDelivery (String consumerTag ,
227228 Envelope envelope ,
228229 AMQP .BasicProperties properties ,
229230 byte [] body )
230231 throws IOException {
232+ String otherConsumerTag = "c1" .equals (consumerTag ) ? "c2" : "c1" ;
233+ if (null != nextTag [0 ])
234+ assertEquals (consumerTag , nextTag [0 ]);
235+ nextTag [0 ] = otherConsumerTag ;
231236 counts .put (consumerTag , counts .get (consumerTag ) + 1 );
232237 super .handleDelivery (consumerTag , envelope ,
233238 properties , body );
You can’t perform that action at this time.
0 commit comments