Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround coveralls upload failure on Travis CI
Our Travis CI builds are configured to run the Gradle `coveralls` task to upload test coverage information to coveralls.io. However, when our Travis CI builds are also configured to use JDK 11, the following error occurs when running the `coveralls` task: > Task :coveralls FAILED service name: travis-ci service job id: 520624518 repo token: null FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':coveralls'. > javax.net.ssl.SSLProtocolException: Connection reset by peer (Write failed) This is because JDK 11 implements support for TLS v1.3 [1], and will attempt to use it if the server also supports it (coveralls.io does). However, a bug [2] in its TLS v1.3 implementation causes it to send invalid data to coveralls.io. When coveralls.io receives this invalid data, it terminates the connection, hence the error occurs. Let's workaround this problem by disabling TLS v1.3 support in the JDK. This workaround should be fine for now, since not many servers support TLS v1.3 yet as the TLS v1.3 spec was only published on Aug 2018 [3]. Furthermore, JDK developers have already acknowledged the bug [2] and targeted its fix for JDK 13 (i.e. in the near future). [1] http://openjdk.java.net/jeps/332 [2] https://bugs.openjdk.java.net/browse/JDK-8221253 [3] https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_1.3 Co-authored-by: Paul Tan <[email protected]>
- Loading branch information