slachiewicz opened a new pull request, #1191: URL: https://github.com/apache/maven-plugin-tools/pull/1191
`JavadocSiteIT` fetches Oracle's live javadoc for JDK 8/11/17, so a slow or blocked network turns the build red for reasons that say nothing about the code — most recently a `SocketTimeoutException` on a macOS runner, after `JavadocSite.getReader` had already retried once. A `TestExecutionExceptionHandler` on the class now walks the cause chain and skips the test when the failure is transport-level: `SocketTimeoutException`, `SocketException` (which covers HttpClient's `HttpHostConnectException`), `UnknownHostException`, `SSLException`. Everything else is rethrown unchanged. The distinction matters and is the reason this is not a blanket `catch (IOException)`: `getReader` reports every non-200 as `FileNotFoundException`, so "Oracle moved the page or changed the anchor scheme" — the thing this IT exists to catch — still fails the build. The handler sits around the whole test rather than inside `assertUrlValid`, because the site is fetched while the link is being built: with an unreachable host, the failure comes out of `createLink`, before any assertion runs. Verified, all three cases: | Base URL | Result | |---|---| | the real Oracle URLs | `Tests run: 15, Failures: 0, Errors: 0, Skipped: 0` | | `http://127.0.0.1:1/docs/api/` (refused) | `Tests run: 5, Skipped: 5`, BUILD SUCCESS | | `.../17/docs/api-does-not-exist/` (reachable, wrong path) | `Tests run: 5, Errors: 5`, BUILD FAILURE | Offline coverage is unaffected: `JavadocSiteTest` already runs the same assertions against the checked-in javadoc fixtures for JDK 8/11/17/21 over `file:` URLs. *This change was created with AI assistance.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
