Updated Branches: refs/heads/flume-1.4 9ba2affe9 -> 8a3b6357c
FLUME-1789: Unit tests TestJCEFileKeyProvider and TestFileChannelEncryption fail with IBM JDK and flume-1.3.0 (Aline Guedes Pinto via Brock Noland) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/8a3b6357 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/8a3b6357 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/8a3b6357 Branch: refs/heads/flume-1.4 Commit: 8a3b6357c9e4700db6bf1b9af3ca898a3116e757 Parents: 9ba2aff Author: Brock Noland <[email protected]> Authored: Wed Dec 19 10:44:29 2012 -0600 Committer: Brock Noland <[email protected]> Committed: Wed Dec 19 10:44:41 2012 -0600 ---------------------------------------------------------------------- .../file/encryption/EncryptionTestUtils.java | 10 ++++++++-- .../src/test/resources/ibm-test.keystore | Bin 0 -> 730 bytes .../src/test/resources/sun-test.keystore | Bin 0 -> 964 bytes .../src/test/resources/test.keystore | Bin 964 -> 0 bytes 4 files changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/8a3b6357/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/EncryptionTestUtils.java ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/EncryptionTestUtils.java b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/EncryptionTestUtils.java index 1ac749a..6ca3246 100644 --- a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/EncryptionTestUtils.java +++ b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/EncryptionTestUtils.java @@ -78,8 +78,14 @@ public class EncryptionTestUtils { public static Map<String, File> configureTestKeyStore(File baseDir, File keyStoreFile) throws IOException { Map<String, File> result = Maps.newHashMap(); - Resources.copy(Resources.getResource("test.keystore"), - new FileOutputStream(keyStoreFile)); + + if (System.getProperty("java.vendor").contains("IBM")) { + Resources.copy(Resources.getResource("ibm-test.keystore"), + new FileOutputStream(keyStoreFile)); + } else { + Resources.copy(Resources.getResource("sun-test.keystore"), + new FileOutputStream(keyStoreFile)); + } /* Commands below: keytool -genseckey -alias key-0 -keypass keyPassword -keyalg AES \ http://git-wip-us.apache.org/repos/asf/flume/blob/8a3b6357/flume-ng-channels/flume-file-channel/src/test/resources/ibm-test.keystore ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/resources/ibm-test.keystore b/flume-ng-channels/flume-file-channel/src/test/resources/ibm-test.keystore new file mode 100644 index 0000000..9d7cd76 Binary files /dev/null and b/flume-ng-channels/flume-file-channel/src/test/resources/ibm-test.keystore differ http://git-wip-us.apache.org/repos/asf/flume/blob/8a3b6357/flume-ng-channels/flume-file-channel/src/test/resources/sun-test.keystore ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/resources/sun-test.keystore b/flume-ng-channels/flume-file-channel/src/test/resources/sun-test.keystore new file mode 100644 index 0000000..98db4d5 Binary files /dev/null and b/flume-ng-channels/flume-file-channel/src/test/resources/sun-test.keystore differ http://git-wip-us.apache.org/repos/asf/flume/blob/8a3b6357/flume-ng-channels/flume-file-channel/src/test/resources/test.keystore ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/resources/test.keystore b/flume-ng-channels/flume-file-channel/src/test/resources/test.keystore deleted file mode 100644 index 98db4d5..0000000 Binary files a/flume-ng-channels/flume-file-channel/src/test/resources/test.keystore and /dev/null differ
