File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -138,18 +138,21 @@ public void testNoAckObeysLimit()
138138 channel .basicQos (1 );
139139 QueueingConsumer c1 = new QueueingConsumer (channel );
140140 declareBindConsume (channel , c1 , false );
141- fill (2 );
141+ fill (1 );
142142 QueueingConsumer c2 = new QueueingConsumer (channel );
143143 declareBindConsume (channel , c2 , true );
144+ fill (1 );
144145 try {
145146 Delivery d = c2 .nextDelivery (1000 );
146147 assertNull (d );
147148 } catch (InterruptedException ie ) {
148149 fail ("interrupted" );
149150 }
150151 Queue <Delivery > d = drain (c1 , 1 );
152+ ack (d , false ); // must ack before the next one appears
153+ d = drain (c1 , 1 );
151154 ack (d , false );
152- // we have no guarantees about where the other message has gone
155+ drain ( c2 , 1 );
153156 }
154157
155158 public void testPermutations ()
You can’t perform that action at this time.
0 commit comments