There was an error fetching the commit references. Please try again later.
Fix retrying of SocketTimeoutExceptions in HttpConnector
As part of investigation of #8974 I found that recent change 982e0b83 broke retries of `SocketTimeoutException` in `HttpConnector`, intention of that change was good but lack of tests resulted in broken logic. IntelliJ highlights the problem ? branch with `instanceof SocketTimeoutException` would have never been executed: <img width="764" alt="Screen Shot 2019-07-29 at 3 26 11 PM" src="https://user-images.githubusercontent.com/967132/62089179-d7bfa400-b21c-11e9-882a-1c1fe1fcb683.png"> --- This PR adds missing tests and fixes the logic to still present `SocketTimeoutException` as `IOException` for upstream consumers while handling it properly internally in the `HttpConnector`. Closes #9008. PiperOrigin-RevId: 261675244
Showing
- src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnector.java 6 additions, 6 deletions.../build/lib/bazel/repository/downloader/HttpConnector.java
- src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorTest.java 159 additions, 1 deletion...ld/lib/bazel/repository/downloader/HttpConnectorTest.java
- src/test/java/com/google/devtools/build/lib/testutil/ManualSleeper.java 31 additions, 1 deletion...com/google/devtools/build/lib/testutil/ManualSleeper.java
- src/test/java/com/google/devtools/build/lib/testutil/ManualSleeperTest.java 139 additions, 0 deletions...google/devtools/build/lib/testutil/ManualSleeperTest.java
Please register or sign in to comment