Skip to content

Commit ffb7cd6

Browse files
author
Simon MacMullen
committed
Simpler and more correct.
1 parent 23a9a58 commit ffb7cd6

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,9 @@ public void testUnknownTagAck()
230230
basicGet();
231231
basicAck();
232232
basicAck(latestTag+1, true);
233-
try {
234-
txCommit();
235-
fail("expected exception");
236-
}
237-
catch (IOException e) {
238-
checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
239-
}
240-
catch (AlreadyClosedException e) {
241-
checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
242-
}
233+
// "On a transacted channel, this check MUST be done immediately and
234+
// not delayed until a Tx.Commit."
235+
expectError(AMQP.PRECONDITION_FAILED);
243236
connection = null;
244237
openConnection();
245238
}

0 commit comments

Comments
 (0)