Fix test after elastic/x-pack-elasticsearch#28919
After elastic/x-pack-elasticsearch#28919 some rest client exceptions are wrapped by the IOException. Original commit: elastic/x-pack-elasticsearch@6c658ae5b7
This commit is contained in:
parent
891013a17b
commit
14acdcb4f7
|
@ -68,7 +68,7 @@ public class SSLClientAuthTests extends SecurityIntegTestCase {
|
|||
try (RestClient restClient = createRestClient(httpClientBuilder -> httpClientBuilder.setSSLStrategy(sessionStrategy), "https")) {
|
||||
restClient.performRequest("GET", "/");
|
||||
fail("Expected SSLHandshakeException");
|
||||
} catch (SSLHandshakeException e) {
|
||||
} catch (IOException e) {
|
||||
Throwable t = ExceptionsHelper.unwrap(e, CertPathBuilderException.class);
|
||||
assertThat(t, instanceOf(CertPathBuilderException.class));
|
||||
assertThat(t.getMessage(), containsString("unable to find valid certification path to requested target"));
|
||||
|
|
Loading…
Reference in New Issue