You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by mi...@apache.org on 2020/01/03 13:12:55 UTC

[httpcomponents-core] branch master updated: HTTPCORE-622: JSSEProviderIntegrationTest fails if Conscrypt JNI wrapper cannot be loaded

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 36c0edc  HTTPCORE-622: JSSEProviderIntegrationTest fails if Conscrypt JNI wrapper cannot be loaded
36c0edc is described below

commit 36c0edcfe105756d0f030a68b1bb3f6d571157d5
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri Jan 3 11:31:16 2020 +0100

    HTTPCORE-622: JSSEProviderIntegrationTest fails if Conscrypt JNI wrapper cannot be loaded
    
    This closes #181
---
 .../apache/hc/core5/testing/nio/JSSEProviderIntegrationTest.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/JSSEProviderIntegrationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/JSSEProviderIntegrationTest.java
index 6d0c3bd..5ddd0c1 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/JSSEProviderIntegrationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/JSSEProviderIntegrationTest.java
@@ -116,7 +116,11 @@ public class JSSEProviderIntegrationTest {
         @Override
         protected void before() throws Throwable {
             if ("Conscrypt".equalsIgnoreCase(securityProviderName)) {
-                securityProvider = Conscrypt.newProviderBuilder().provideTrustManager(true).build();
+                try {
+                    securityProvider = Conscrypt.newProviderBuilder().provideTrustManager(true).build();
+                } catch (final UnsatisfiedLinkError e) {
+                    Assume.assumeFalse("Conscrypt provider failed to be loaded: " + e.getMessage(), true);
+                }
             } else {
                 securityProvider = null;
             }