HADOOP-16321: ITestS3ASSL+TestOpenSSLSocketFactory failing with java.lang.UnsatisfiedLinkErrors

This commit is contained in:
Sahil Takiar 2019-05-20 19:36:44 -05:00 committed by Sean Mackrory
parent ff5691ca06
commit 5906268f0d
2 changed files with 10 additions and 3 deletions

View File

@ -35,7 +35,10 @@ public class TestOpenSSLSocketFactory {
@Test
public void testOpenSSL() throws IOException {
assumeTrue(NativeCodeLoader.buildSupportsOpenssl());
assumeTrue("Unable to load native libraries",
NativeCodeLoader.isNativeCodeLoaded());
assumeTrue("Build was not compiled with support for OpenSSL",
NativeCodeLoader.buildSupportsOpenssl());
OpenSSLSocketFactory.initializeDefaultFactory(
OpenSSLSocketFactory.SSLChannelMode.OpenSSL);
assertThat(OpenSSLSocketFactory.getDefaultFactory()
@ -44,7 +47,8 @@ public class TestOpenSSLSocketFactory {
@Test
public void testJSEEJava8() throws IOException {
assumeTrue(System.getProperty("java.version").startsWith("1.8"));
assumeTrue("Not running on Java 8",
System.getProperty("java.version").startsWith("1.8"));
OpenSSLSocketFactory.initializeDefaultFactory(
OpenSSLSocketFactory.SSLChannelMode.Default_JSSE);
assertThat(Arrays.stream(OpenSSLSocketFactory.getDefaultFactory()

View File

@ -40,7 +40,10 @@ public class ITestS3ASSL extends AbstractS3ATestBase {
@Test
public void testOpenSSL() throws IOException {
assumeTrue(NativeCodeLoader.buildSupportsOpenssl());
assumeTrue("Unable to load native libraries",
NativeCodeLoader.isNativeCodeLoaded());
assumeTrue("Build was not compiled with support for OpenSSL",
NativeCodeLoader.buildSupportsOpenssl());
Configuration conf = new Configuration(getConfiguration());
conf.setEnum(Constants.SSL_CHANNEL_MODE,
OpenSSLSocketFactory.SSLChannelMode.OpenSSL);