Skip to content

Commit

Permalink
HADOOP-12158. Improve error message in TestCryptoStreamsWithOpensslAe…
Browse files Browse the repository at this point in the history
…sCtrCryptoCodec when OpenSSL is not installed.
  • Loading branch information
umbrant committed Jun 30, 2015
1 parent 6f2a41e commit 9ee7b6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions hadoop-common-project/hadoop-common/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,11 @@ Release 2.8.0 - UNRELEASED

HADOOP-11958. MetricsSystemImpl fails to show backtrace when an error
occurs (Jason Lowe via jeagles)

HADOOP-12158. Improve error message in
TestCryptoStreamsWithOpensslAesCtrCryptoCodec when OpenSSL is not
installed. (wang)

OPTIMIZATIONS

HADOOP-11785. Reduce the number of listStatus operation in distcp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
import org.junit.Assert;
import org.junit.BeforeClass;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

public class TestCryptoStreamsWithOpensslAesCtrCryptoCodec
extends TestCryptoStreams {

Expand All @@ -32,7 +34,10 @@ public static void init() throws Exception {
CommonConfigurationKeysPublic.HADOOP_SECURITY_CRYPTO_CODEC_CLASSES_AES_CTR_NOPADDING_KEY,
OpensslAesCtrCryptoCodec.class.getName());
codec = CryptoCodec.getInstance(conf);
Assert.assertEquals(OpensslAesCtrCryptoCodec.class.getCanonicalName(),
assertNotNull("Unable to instantiate codec " +
OpensslAesCtrCryptoCodec.class.getName() + ", is the required "
+ "version of OpenSSL installed?", codec);
assertEquals(OpensslAesCtrCryptoCodec.class.getCanonicalName(),
codec.getClass().getCanonicalName());
}
}

0 comments on commit 9ee7b6e

Please sign in to comment.