HADOOP-11062. CryptoCodec testcases requiring OpenSSL should be run only if -Pnative is used. (asuresh via tucu)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/pom.xml
This commit is contained in:
Alejandro Abdelnur 2014-09-16 23:36:10 -07:00
parent 75bd79231c
commit 1c847fdd61
4 changed files with 33 additions and 2 deletions

View File

@ -486,6 +486,9 @@ Release 2.6.0 - UNRELEASED
HADOOP-11097. kms docs say proxyusers, not proxyuser for config params.
(clamb via tucu)
HADOOP-11062. CryptoCodec testcases requiring OpenSSL should be run
only if -Pnative is used. (asuresh via tucu)
Release 2.5.1 - 2014-09-05
INCOMPATIBLE CHANGES

View File

@ -390,6 +390,7 @@
<systemPropertyVariables>
<startKdc>${startKdc}</startKdc>
<kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
<runningWithNative>${runningWithNative}</runningWithNative>
</systemPropertyVariables>
</configuration>
</plugin>
@ -528,6 +529,7 @@
<openssl.lib></openssl.lib>
<openssl.include></openssl.include>
<require.openssl>false</require.openssl>
<runningWithNative>true</runningWithNative>
</properties>
<build>
<plugins>
@ -647,6 +649,7 @@
<openssl.lib></openssl.lib>
<openssl.include></openssl.include>
<require.openssl>false</require.openssl>
<runningWithNative>true</runningWithNative>
<bundle.openssl.in.bin>true</bundle.openssl.in.bin>
</properties>
<build>

View File

@ -59,7 +59,14 @@ public class TestCryptoCodec {
@Test(timeout=120000)
public void testJceAesCtrCryptoCodec() throws Exception {
Assume.assumeTrue(NativeCodeLoader.buildSupportsOpenssl());
if (!"true".equalsIgnoreCase(System.getProperty("runningWithNative"))) {
LOG.warn("Skipping since test was not run with -Pnative flag");
Assume.assumeTrue(false);
}
if (!NativeCodeLoader.buildSupportsOpenssl()) {
LOG.warn("Skipping test since openSSL library not loaded");
Assume.assumeTrue(false);
}
Assert.assertEquals(null, OpensslCipher.getLoadingFailureReason());
cryptoCodecTest(conf, seed, 0, jceCodecClass, jceCodecClass);
cryptoCodecTest(conf, seed, count, jceCodecClass, jceCodecClass);
@ -68,7 +75,14 @@ public class TestCryptoCodec {
@Test(timeout=120000)
public void testOpensslAesCtrCryptoCodec() throws Exception {
Assume.assumeTrue(NativeCodeLoader.buildSupportsOpenssl());
if (!"true".equalsIgnoreCase(System.getProperty("runningWithNative"))) {
LOG.warn("Skipping since test was not run with -Pnative flag");
Assume.assumeTrue(false);
}
if (!NativeCodeLoader.buildSupportsOpenssl()) {
LOG.warn("Skipping test since openSSL library not loaded");
Assume.assumeTrue(false);
}
Assert.assertEquals(null, OpensslCipher.getLoadingFailureReason());
cryptoCodecTest(conf, seed, 0, opensslCodecClass, opensslCodecClass);
cryptoCodecTest(conf, seed, count, opensslCodecClass, opensslCodecClass);

View File

@ -215,6 +215,11 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<startKdc>${startKdc}</startKdc>
<kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
<runningWithNative>${runningWithNative}</runningWithNative>
</systemPropertyVariables>
<properties>
<property>
<name>listener</name>
@ -529,6 +534,9 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<family>windows</family>
</os>
</activation>
<properties>
<runningWithNative>true</runningWithNative>
</properties>
<build>
<plugins>
<plugin>
@ -619,6 +627,9 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<runningWithNative>true</runningWithNative>
</properties>
<build>
<plugins>
<plugin>