@@ -60,45 +60,34 @@ protected void setUp() throws IOException {
6060 "confirm-multiple-queues" );
6161 }
6262
63- public void testPersistentMandatoryImmediateCombinations ()
63+ public void testPersistentMandatoryCombinations ()
6464 throws IOException , InterruptedException
6565 {
6666 boolean b [] = { false , true };
6767 for (boolean persistent : b ) {
6868 for (boolean mandatory : b ) {
69- for (boolean immediate : b ) {
70- confirmTest ("" , "confirm-test" ,
71- persistent , mandatory , immediate );
72- }
69+ confirmTest ("" , "confirm-test" , persistent , mandatory );
7370 }
7471 }
7572 }
7673
7774 public void testNonDurable ()
7875 throws IOException , InterruptedException
7976 {
80- confirmTest ("" , "confirm-test-nondurable" , true , false , false );
81- }
82-
83- public void testImmediateNoConsumer ()
84- throws IOException , InterruptedException
85- {
86- confirmTest ("" , "confirm-test-noconsumer" , false , false , true );
87- confirmTest ("" , "confirm-test-noconsumer" , true , false , true );
77+ confirmTest ("" , "confirm-test-nondurable" , true , false );
8878 }
8979
9080 public void testMandatoryNoRoute ()
9181 throws IOException , InterruptedException
9282 {
93- confirmTest ("" , "confirm-test-doesnotexist" , false , true , false );
94- confirmTest ("" , "confirm-test-doesnotexist" , true , true , false );
83+ confirmTest ("" , "confirm-test-doesnotexist" , false , true );
84+ confirmTest ("" , "confirm-test-doesnotexist" , true , true );
9585 }
9686
9787 public void testMultipleQueues ()
9888 throws IOException , InterruptedException
9989 {
100- confirmTest ("amq.direct" , "confirm-multiple-queues" ,
101- true , false , false );
90+ confirmTest ("amq.direct" , "confirm-multiple-queues" , true , false );
10291 }
10392
10493 /* For testQueueDelete and testQueuePurge to be
@@ -109,7 +98,7 @@ public void testMultipleQueues()
10998 public void testQueueDelete ()
11099 throws IOException , InterruptedException
111100 {
112- publishN ("" ,"confirm-test-noconsumer" , true , false , false );
101+ publishN ("" ,"confirm-test-noconsumer" , true , false );
113102
114103 channel .queueDelete ("confirm-test-noconsumer" );
115104
@@ -119,7 +108,7 @@ public void testQueueDelete()
119108 public void testQueuePurge ()
120109 throws IOException , InterruptedException
121110 {
122- publishN ("" , "confirm-test-noconsumer" , true , false , false );
111+ publishN ("" , "confirm-test-noconsumer" , true , false );
123112
124113 channel .queuePurge ("confirm-test-noconsumer" );
125114
@@ -142,7 +131,7 @@ public void testQueueTTL()
142131 Collections .singletonMap (TTL_ARG , (Object )ttl );
143132 channel .queueDeclare ("confirm-ttl" , true , true , false , argMap );
144133
145- publishN ("" , "confirm-ttl" , true , false , false );
134+ publishN ("" , "confirm-ttl" , true , false );
146135 channel .waitForConfirmsOrDie ();
147136
148137 channel .queueDelete ("confirm-ttl" );
@@ -166,7 +155,7 @@ public void testBasicRejectRequeue()
166155 public void testBasicRecover ()
167156 throws IOException , InterruptedException
168157 {
169- publishN ("" , "confirm-test-noconsumer" , true , false , false );
158+ publishN ("" , "confirm-test-noconsumer" , true , false );
170159
171160 for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
172161 GetResponse resp =
@@ -231,7 +220,7 @@ public void handleNack(long seqNo, boolean multiple) {
231220
232221 for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
233222 unconfirmedSet .add (channel .getNextPublishSeqNo ());
234- publish ("" , "confirm-test" , true , false , false );
223+ publish ("" , "confirm-test" , true , false );
235224 }
236225
237226 channel .waitForConfirmsOrDie ();
@@ -245,14 +234,14 @@ public void testWaitForConfirmsNoOp()
245234 {
246235 channel = connection .createChannel ();
247236 // Don't enable Confirm mode
248- publish ("" , "confirm-test" , true , false , false );
237+ publish ("" , "confirm-test" , true , false );
249238 channel .waitForConfirmsOrDie (); // Nop
250239 }
251240
252241 public void testWaitForConfirmsException ()
253242 throws IOException , InterruptedException
254243 {
255- publishN ("" , "confirm-test" , true , false , false );
244+ publishN ("" , "confirm-test" , true , false );
256245 channel .close ();
257246 try {
258247 channel .waitForConfirmsOrDie ();
@@ -268,29 +257,27 @@ public void testWaitForConfirmsException()
268257
269258 /* Publish NUM_MESSAGES messages and wait for confirmations. */
270259 public void confirmTest (String exchange , String queueName ,
271- boolean persistent , boolean mandatory ,
272- boolean immediate )
260+ boolean persistent , boolean mandatory )
273261 throws IOException , InterruptedException
274262 {
275- publishN (exchange , queueName , persistent , mandatory , immediate );
263+ publishN (exchange , queueName , persistent , mandatory );
276264
277265 channel .waitForConfirmsOrDie ();
278266 }
279267
280268 private void publishN (String exchangeName , String queueName ,
281- boolean persistent , boolean mandatory ,
282- boolean immediate )
269+ boolean persistent , boolean mandatory )
283270 throws IOException
284271 {
285272 for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
286- publish (exchangeName , queueName , persistent , mandatory , immediate );
273+ publish (exchangeName , queueName , persistent , mandatory );
287274 }
288275 }
289276
290277 private void basicRejectCommon (boolean requeue )
291278 throws IOException
292279 {
293- publishN ("" , "confirm-test-noconsumer" , true , false , false );
280+ publishN ("" , "confirm-test-noconsumer" , true , false );
294281
295282 for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
296283 GetResponse resp =
@@ -301,10 +288,9 @@ private void basicRejectCommon(boolean requeue)
301288 }
302289
303290 protected void publish (String exchangeName , String queueName ,
304- boolean persistent , boolean mandatory ,
305- boolean immediate )
291+ boolean persistent , boolean mandatory )
306292 throws IOException {
307- channel .basicPublish (exchangeName , queueName , mandatory , immediate ,
293+ channel .basicPublish (exchangeName , queueName , mandatory , false ,
308294 persistent ? MessageProperties .PERSISTENT_BASIC
309295 : MessageProperties .BASIC ,
310296 "nop" .getBytes ());
0 commit comments