Changeset 18690 in josm for trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java
- Timestamp:
- 2023-03-13T21:59:27+01:00 (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java
r18437 r18690 240 240 void testTooMuchRedirects() throws IOException { 241 241 mockRedirects(false, 3); 242 assertThrows(IOException.class, () -> HttpClient.create(url("/relative-redirect/3")).setMaxRedirects(2).connect(progress)); 242 final HttpClient client = HttpClient.create(url("/relative-redirect/3")).setMaxRedirects(2); 243 try { 244 assertThrows(IOException.class, () -> client.connect(progress)); 245 } finally { 246 client.disconnect(); 247 } 243 248 } 244 249 … … 370 375 void testTakesTooLong() throws IOException { 371 376 mockDelay(1); 372 assertThrows(IOException.class, () -> HttpClient.create(url("/delay/1")).setReadTimeout(500).connect(progress)); 377 final HttpClient client = HttpClient.create(url("/delay/1")).setReadTimeout(500); 378 try { 379 assertThrows(IOException.class, () -> client.connect(progress)); 380 } finally { 381 client.disconnect(); 382 } 373 383 } 374 384 … … 387 397 388 398 /** 389 * Test of {@link Response#uncompress } method with Gzip compression.399 * Test of {@link Response#uncompress(boolean)} method with Gzip compression. 390 400 * @throws IOException if any I/O error occurs 391 401 */ … … 407 417 408 418 /** 409 * Test of {@link Response#uncompress } method with Bzip compression.419 * Test of {@link Response#uncompress(boolean)} method with Bzip compression. 410 420 * @throws IOException if any I/O error occurs 411 421 */ … … 427 437 428 438 /** 429 * Test of {@link Response#uncompress } method with Bzip compression.439 * Test of {@link Response#uncompress(boolean)} method with Bzip compression. 430 440 * @throws IOException if any I/O error occurs 431 441 */
Note:
See TracChangeset
for help on using the changeset viewer.