Skip to content

Commit a5602bf

Browse files
author
Matthias Radestock
committed
add some more limit changing tests
1 parent 05e0a1e commit a5602bf

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/src/com/rabbitmq/client/test/functional/QosTests.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,32 @@ public void testSetLimitAfterConsume()
172172
drain(c, 1);
173173
}
174174

175+
public void testLimitIncrease()
176+
throws IOException
177+
{
178+
QueueingConsumer c = new QueueingConsumer(channel);
179+
channel.basicQos(1);
180+
declareBindConsume(c);
181+
fill(3);
182+
drain(c, 1);
183+
channel.basicQos(2);
184+
drain(c, 1);
185+
}
186+
187+
public void testLimitDecrease()
188+
throws IOException
189+
{
190+
QueueingConsumer c = new QueueingConsumer(channel);
191+
channel.basicQos(2);
192+
declareBindConsume(c);
193+
fill(4);
194+
Queue<Delivery> d = drain(c, 2);
195+
channel.basicQos(1);
196+
drain(c, 0);
197+
ack(d, true);
198+
drain(c, 1);
199+
}
200+
175201
protected void runLimitTests(int limit,
176202
boolean multiAck,
177203
boolean txMode,

0 commit comments

Comments
 (0)