Skip to content

Commit 17c1742

Browse files
committed
add test for tx/confirm interaction
1 parent e838ebd commit 17c1742

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,19 @@ public void testBasicRecover()
187187
public void testSelect()
188188
throws IOException
189189
{
190-
Channel ch = connection.createChannel();
191-
ch.confirmSelect();
192-
ch.confirmSelect();
190+
channel.confirmSelect();
191+
}
192+
193+
public void testTx()
194+
throws IOException, InterruptedException
195+
{
196+
channel.txSelect();
197+
publishN("", "confirm-test", false, false, false);
198+
channel.txCommit();
199+
waitAcks();
200+
publishN("", "confirm-test", false, false, false);
201+
channel.txRollback();
202+
waitAcks();
193203
}
194204

195205
/* Publish NUM_MESSAGES messages and wait for confirmations. */

0 commit comments

Comments
 (0)