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()
138
138
channel .basicQos (1 );
139
139
QueueingConsumer c1 = new QueueingConsumer (channel );
140
140
declareBindConsume (channel , c1 , false );
141
- fill (2 );
141
+ fill (1 );
142
142
QueueingConsumer c2 = new QueueingConsumer (channel );
143
143
declareBindConsume (channel , c2 , true );
144
+ fill (1 );
144
145
try {
145
146
Delivery d = c2 .nextDelivery (1000 );
146
147
assertNull (d );
147
148
} catch (InterruptedException ie ) {
148
149
fail ("interrupted" );
149
150
}
150
151
Queue <Delivery > d = drain (c1 , 1 );
152
+ ack (d , false ); // must ack before the next one appears
153
+ d = drain (c1 , 1 );
151
154
ack (d , false );
152
- // we have no guarantees about where the other message has gone
155
+ drain ( c2 , 1 );
153
156
}
154
157
155
158
public void testPermutations ()
You can’t perform that action at this time.
0 commit comments