File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,28 @@ public void testFairness()
159159
160160 }
161161
162+ public void testConsumerLifecycle ()
163+ throws IOException
164+ {
165+ channel .basicQos (1 );
166+ QueueingConsumer c = new QueueingConsumer (channel );
167+ String queue = "qosTest" ;
168+ channel .queueDeclare (queue , false );
169+ channel .queueBind (queue , "amq.fanout" , "" );
170+ fill (3 );
171+ String tag ;
172+ for (int i = 0 ; i < 2 ; i ++) {
173+ tag = channel .basicConsume (queue , false , c );
174+ Queue <Delivery > d = drain (c , 1 );
175+ channel .basicCancel (tag );
176+ drain (c , 0 );
177+ ack (d , true );
178+ drain (c , 0 );
179+ }
180+ channel .queueDelete (queue );
181+ }
182+
183+
162184 public void testSetLimitAfterConsume ()
163185 throws IOException
164186 {
You can’t perform that action at this time.
0 commit comments