Commit 7d773de
committed
Add retry logic and conditional tests for SDKMAN API resilience
Improve test reliability in CI environments by addressing SDKMAN API
rate limiting and availability issues:
JdkResolver improvements:
- Add retry logic with exponential backoff (3 retries, 1s initial delay)
- Detect retryable errors (503, 502, 504, 429, timeouts, connection issues)
- Graceful handling of transient network failures
- Maintain existing API behavior for successful requests
Test improvements:
- Add @EnabledIf conditional execution for network-dependent tests
- Tests only run when SDKMAN API is available (prevents flaky CI failures)
- Quick API availability check with 5-second timeout
- Skip tests gracefully when API returns 503/502/504 errors
This addresses the CI flakiness caused by SDKMAN API bandwidth limiting
and intermittent 503 errors while maintaining full test coverage when
the API is available.1 parent 89b715b commit 7d773de
File tree
2 files changed
+100
-5
lines changed- maven-wrapper/src
- main/java/org/apache/maven/wrapper
- test/java/org/apache/maven/wrapper
2 files changed
+100
-5
lines changedLines changed: 67 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 277 | + | |
| 278 | + | |
280 | 279 | | |
281 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
282 | 321 | | |
283 | 322 | | |
284 | 323 | | |
| |||
322 | 361 | | |
323 | 362 | | |
324 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
325 | 389 | | |
326 | 390 | | |
327 | 391 | | |
| |||
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
32 | 59 | | |
| 60 | + | |
33 | 61 | | |
34 | 62 | | |
35 | 63 | | |
| |||
43 | 71 | | |
44 | 72 | | |
45 | 73 | | |
| 74 | + | |
46 | 75 | | |
47 | 76 | | |
48 | 77 | | |
| |||
67 | 96 | | |
68 | 97 | | |
69 | 98 | | |
| 99 | + | |
70 | 100 | | |
71 | 101 | | |
72 | 102 | | |
| |||
80 | 110 | | |
81 | 111 | | |
82 | 112 | | |
| 113 | + | |
83 | 114 | | |
84 | 115 | | |
85 | 116 | | |
86 | 117 | | |
87 | | - | |
88 | | - | |
| 118 | + | |
| 119 | + | |
89 | 120 | | |
90 | 121 | | |
91 | 122 | | |
| |||
0 commit comments