File tree Expand file tree Collapse file tree 4 files changed +8
-13
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ public class ConsumerCancelledException extends RuntimeException implements
2424 /** Default for non-checking. */
2525 private static final long serialVersionUID = 1L ;
2626
27- @ Override
2827 public ConsumerCancelledException sensibleClone () {
2928 try {
3029 return (ConsumerCancelledException ) super .clone ();
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ public void testConsumerCancellationInterruptsQueuingConsumerWait()
5757 final QueueingConsumer consumer = new QueueingConsumer (channel );
5858 Runnable receiver = new Runnable () {
5959
60- @ Override
6160 public void run () {
6261 try {
6362 try {
Original file line number Diff line number Diff line change @@ -108,9 +108,10 @@ public void testTTLMustBePositive() throws Exception {
108108 public void testQueueRedeclareEquivalence () throws Exception {
109109 declareQueue (TTL_QUEUE_NAME , 10 );
110110 try {
111- declareQueue (TTL_QUEUE_NAME , 20 );
111+ declareQueue (TTL_QUEUE_NAME , 20 );
112+ fail ("Should not be able to redeclare with different TTL" );
112113 } catch (IOException ex ) {
113- checkShutdownSignal (AMQP .NOT_ALLOWED , ex );
114+ checkShutdownSignal (AMQP .PRECONDITION_FAILED , ex );
114115 }
115116 }
116117
Original file line number Diff line number Diff line change 1818package com .rabbitmq .client .test .functional ;
1919
2020import com .rabbitmq .client .AMQP ;
21+ import com .rabbitmq .client .AlreadyClosedException ;
2122import com .rabbitmq .client .test .BrokerTestCase ;
2223import java .io .IOException ;
2324
@@ -229,15 +230,10 @@ public void testUnknownTagAck()
229230 basicGet ();
230231 basicAck ();
231232 basicAck (latestTag +1 , true );
232- try {
233- txCommit ();
234- fail ("expected exception" );
235- }
236- catch (IOException e ) {
237- checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
238- }
239- connection = null ;
240- openConnection ();
233+ // "On a transacted channel, this check MUST be done immediately and
234+ // not delayed until a Tx.Commit."
235+ expectError (AMQP .PRECONDITION_FAILED );
236+ openChannel ();
241237 }
242238
243239 /*
You can’t perform that action at this time.
0 commit comments