Skip to content

Commit

Permalink
fix RestClientBuilderIntegTests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Jan 6, 2025
1 parent 5620dcb commit f23b16f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
Expand Down Expand Up @@ -96,7 +97,13 @@ public void testBuilderUsesDefaultSSLContext() throws Exception {
client.performRequest(new Request("GET", "/"));
fail("connection should have been rejected due to SSL handshake");
} catch (Exception e) {
assertThat(e, instanceOf(SSLHandshakeException.class));
if (inFipsJvm()) {
// Bouncy Castle throw a different exception
assertThat(e, instanceOf(IOException.class));
assertThat(e.getCause().getClass(), is(javax.net.ssl.SSLException.class));
} else {
assertThat(e, instanceOf(SSLHandshakeException.class));
}
}
}

Expand Down

0 comments on commit f23b16f

Please sign in to comment.