Skip to content

Commit

Permalink
add jdk 21 in CI build and fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjlu committed Jan 1, 2025
1 parent d7db0d8 commit a76fa66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17 ]
java: [ 11, 17, 21 ]
name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/com/hsbc/cranker/connector/HttpUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ void nonTrustAllClientThrowsExceptionWhenConnectToSelfSignedCertServer() {
.start();


assertThrows(SSLHandshakeException.class, () -> {
// on JDK 11, it's IOException
// on JDK 17, it's SSLHandshakeException
assertThrows(Exception.class, () -> {
HttpClient client = HttpUtils.createHttpClientBuilder(false).build();
client.send(HttpRequest.newBuilder(server.uri()).build(), HttpResponse.BodyHandlers.ofString());
});
Expand Down

0 comments on commit a76fa66

Please sign in to comment.