commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject commons-crypto git commit: Skip test if OpenSSL/JNI cannot be loaded
Date Wed, 06 Jul 2016 22:54:59 GMT
Repository: commons-crypto
Updated Branches:
  refs/heads/master 80fa61edf -> aaae85c8a


Skip test if OpenSSL/JNI cannot be loaded

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/aaae85c8
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/aaae85c8
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/aaae85c8

Branch: refs/heads/master
Commit: aaae85c8a27b94195f86b778440365141db04038
Parents: 80fa61e
Author: Sebb <sebb@apache.org>
Authored: Wed Jul 6 23:54:56 2016 +0100
Committer: Sebb <sebb@apache.org>
Committed: Wed Jul 6 23:54:56 2016 +0100

----------------------------------------------------------------------
 .../apache/commons/crypto/random/OpensslCryptoRandomTest.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/aaae85c8/src/test/java/org/apache/commons/crypto/random/OpensslCryptoRandomTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/crypto/random/OpensslCryptoRandomTest.java b/src/test/java/org/apache/commons/crypto/random/OpensslCryptoRandomTest.java
index 6f40484..4784b18 100644
--- a/src/test/java/org/apache/commons/crypto/random/OpensslCryptoRandomTest.java
+++ b/src/test/java/org/apache/commons/crypto/random/OpensslCryptoRandomTest.java
@@ -20,12 +20,16 @@ package org.apache.commons.crypto.random;
 import java.security.GeneralSecurityException;
 import java.util.Properties;
 
+import org.apache.commons.crypto.Crypto;
+import org.junit.Assume;
+
 import static org.junit.Assert.fail;
 
 public class OpensslCryptoRandomTest extends AbstractRandomTest {
 
     @Override
     public CryptoRandom getCryptoRandom() throws GeneralSecurityException {
+        Assume.assumeTrue(Crypto.isNativeCodeLoaded());
         Properties props = new Properties();
         props.setProperty(
                 CryptoRandomFactory.CLASSES_KEY,


Mime
View raw message