3131import java .util .Map ;
3232import java .util .SortedSet ;
3333import java .util .TreeSet ;
34- import java .util .concurrent .TimeoutException ;
3534
3635public class Confirm extends ConfirmBase
3736{
@@ -65,49 +64,49 @@ protected void setUp() throws IOException {
6564 }
6665
6766 public void testTransient ()
68- throws IOException , InterruptedException , TimeoutException
67+ throws Exception
6968 {
7069 confirmTest ("" , "confirm-test" , false , false , false );
7170 }
7271
7372 public void testPersistentSimple ()
74- throws IOException , InterruptedException , TimeoutException
73+ throws Exception
7574 {
7675 confirmTest ("" , "confirm-test" , true , false , false );
7776 }
7877
7978 public void testNonDurable ()
80- throws IOException , InterruptedException , TimeoutException
79+ throws Exception
8180 {
8281 confirmTest ("" , "confirm-test-nondurable" , true , false , false );
8382 }
8483
8584 public void testPersistentImmediate ()
86- throws IOException , InterruptedException , TimeoutException
85+ throws Exception
8786 {
8887 confirmTest ("" , "confirm-test" , true , false , true );
8988 }
9089
9190 public void testPersistentImmediateNoConsumer ()
92- throws IOException , InterruptedException , TimeoutException
91+ throws Exception
9392 {
9493 confirmTest ("" , "confirm-test-noconsumer" , true , false , true );
9594 }
9695
9796 public void testPersistentMandatory ()
98- throws IOException , InterruptedException , TimeoutException
97+ throws Exception
9998 {
10099 confirmTest ("" , "confirm-test" , true , true , false );
101100 }
102101
103102 public void testPersistentMandatoryReturn ()
104- throws IOException , InterruptedException , TimeoutException
103+ throws Exception
105104 {
106105 confirmTest ("" , "confirm-test-doesnotexist" , true , true , false );
107106 }
108107
109108 public void testMultipleQueues ()
110- throws IOException , InterruptedException , TimeoutException
109+ throws Exception
111110 {
112111 confirmTest ("amq.direct" , "confirm-multiple-queues" ,
113112 true , false , false );
@@ -119,7 +118,7 @@ public void testMultipleQueues()
119118 * internal_sync that notifies the clients. */
120119
121120 public void testQueueDelete ()
122- throws IOException , InterruptedException , TimeoutException
121+ throws Exception
123122 {
124123 publishN ("" ,"confirm-test-noconsumer" , true , false , false );
125124
@@ -129,7 +128,7 @@ public void testQueueDelete()
129128 }
130129
131130 public void testQueuePurge ()
132- throws IOException , InterruptedException , TimeoutException
131+ throws Exception
133132 {
134133 publishN ("" , "confirm-test-noconsumer" , true , false , false );
135134
@@ -139,23 +138,23 @@ public void testQueuePurge()
139138 }
140139
141140 public void testBasicReject ()
142- throws IOException , InterruptedException , TimeoutException
141+ throws Exception
143142 {
144143 basicRejectCommon (false );
145144
146145 waitForConfirms ();
147146 }
148147
149148 public void testQueueTTL ()
150- throws IOException , InterruptedException , TimeoutException
149+ throws Exception
151150 {
152151 publishN ("" , "confirm-ttl" , true , false , false );
153152
154153 waitForConfirms ();
155154 }
156155
157156 public void testBasicRejectRequeue ()
158- throws IOException , InterruptedException , TimeoutException
157+ throws Exception
159158 {
160159 basicRejectCommon (true );
161160
@@ -169,7 +168,7 @@ public void testBasicRejectRequeue()
169168 }
170169
171170 public void testBasicRecover ()
172- throws IOException , InterruptedException , TimeoutException
171+ throws Exception
173172 {
174173 publishN ("" , "confirm-test-noconsumer" , true , false , false );
175174
@@ -191,7 +190,7 @@ public void testBasicRecover()
191190 }
192191
193192 public void testSelect ()
194- throws IOException
193+ throws Exception
195194 {
196195 channel .confirmSelect ();
197196 try {
@@ -213,7 +212,7 @@ public void testSelect()
213212 }
214213
215214 public void testWaitForConfirms ()
216- throws IOException , InterruptedException , TimeoutException
215+ throws Exception
217216 {
218217 final SortedSet <Long > unconfirmedSet =
219218 Collections .synchronizedSortedSet (new TreeSet <Long >());
@@ -246,7 +245,7 @@ public void handleNack(long seqNo, boolean multiple) {
246245 }
247246
248247 public void testWaitForConfirmsNoOp ()
249- throws IOException , InterruptedException , TimeoutException
248+ throws Exception
250249 {
251250 channel = connection .createChannel ();
252251 // Don't enable Confirm mode
@@ -255,7 +254,7 @@ public void testWaitForConfirmsNoOp()
255254 }
256255
257256 public void testWaitForConfirmsException ()
258- throws IOException , InterruptedException , TimeoutException
257+ throws Exception
259258 {
260259 publishN ("" , "confirm-test" , true , false , false );
261260 channel .close ();
@@ -275,7 +274,7 @@ public void testWaitForConfirmsException()
275274 public void confirmTest (String exchange , String queueName ,
276275 boolean persistent , boolean mandatory ,
277276 boolean immediate )
278- throws IOException , InterruptedException , TimeoutException
277+ throws Exception
279278 {
280279 publishN (exchange , queueName , persistent , mandatory , immediate );
281280
@@ -285,15 +284,15 @@ public void confirmTest(String exchange, String queueName,
285284 private void publishN (String exchangeName , String queueName ,
286285 boolean persistent , boolean mandatory ,
287286 boolean immediate )
288- throws IOException
287+ throws Exception
289288 {
290289 for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
291290 publish (exchangeName , queueName , persistent , mandatory , immediate );
292291 }
293292 }
294293
295294 private void basicRejectCommon (boolean requeue )
296- throws IOException
295+ throws Exception
297296 {
298297 publishN ("" , "confirm-test-noconsumer" , true , false , false );
299298
@@ -308,7 +307,7 @@ private void basicRejectCommon(boolean requeue)
308307 protected void publish (String exchangeName , String queueName ,
309308 boolean persistent , boolean mandatory ,
310309 boolean immediate )
311- throws IOException {
310+ throws Exception {
312311 channel .basicPublish (exchangeName , queueName , mandatory , immediate ,
313312 persistent ? MessageProperties .PERSISTENT_BASIC
314313 : MessageProperties .BASIC ,
0 commit comments