Skip to content

Commit 289bbd1

Browse files
author
Simon MacMullen
committed
A bit more testing.
1 parent 334a1dd commit 289bbd1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,27 @@ public void testCommitAcks()
169169
assertNull(basicGet());
170170
}
171171

172+
/*
173+
*/
174+
public void testCommitAcksOutOfOrder()
175+
throws IOException
176+
{
177+
basicPublish();
178+
basicPublish();
179+
basicPublish();
180+
basicPublish();
181+
txSelect();
182+
GetResponse resp1 = basicGet();
183+
GetResponse resp2 = basicGet();
184+
GetResponse resp3 = basicGet();
185+
GetResponse resp4 = basicGet();
186+
channel.basicNack(resp4.getEnvelope().getDeliveryTag(), false, false);
187+
channel.basicNack(resp3.getEnvelope().getDeliveryTag(), false, false);
188+
channel.basicAck(resp2.getEnvelope().getDeliveryTag(), false);
189+
channel.basicAck(resp1.getEnvelope().getDeliveryTag(), false);
190+
txCommit();
191+
}
192+
172193
/*
173194
rollback rolls back acks
174195
and a rolled back ack can be re-issued

0 commit comments

Comments
 (0)