@@ -54,9 +54,6 @@ protected void setUp() throws IOException {
5454 channel .queueDeclare ("confirm-test-2" , true , true , false , null );
5555 channel .basicConsume ("confirm-test-2" , true ,
5656 new DefaultConsumer (channel ));
57- Map <String , Object > argMap =
58- Collections .singletonMap (TTL_ARG , (Object )1 );
59- channel .queueDeclare ("confirm-ttl" , true , true , false , argMap );
6057 channel .queueBind ("confirm-test" , "amq.direct" ,
6158 "confirm-multiple-queues" );
6259 channel .queueBind ("confirm-test-2" , "amq.direct" ,
@@ -140,9 +137,16 @@ public void testBasicReject()
140137 public void testQueueTTL ()
141138 throws IOException , InterruptedException
142139 {
143- publishN ("" , "confirm-ttl" , true , false , false );
140+ for (int ttl : new int []{ 1 , 0 }) {
141+ Map <String , Object > argMap =
142+ Collections .singletonMap (TTL_ARG , (Object )ttl );
143+ channel .queueDeclare ("confirm-ttl" , true , true , false , argMap );
144144
145- channel .waitForConfirmsOrDie ();
145+ publishN ("" , "confirm-ttl" , true , false , false );
146+ channel .waitForConfirmsOrDie ();
147+
148+ channel .queueDelete ("confirm-ttl" );
149+ }
146150 }
147151
148152 public void testBasicRejectRequeue ()
0 commit comments