Updated Branches:
  refs/heads/trunk 0dacb250a -> 159f0bd26

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/159f0bd2
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/159f0bd2
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/159f0bd2

Branch: refs/heads/trunk
Commit: 159f0bd26e80ca76bd6ff80901f9e6cc14efbc66
Parents: 0dacb25
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:29 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/159f0bd2/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/159f0bd2/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/159f0bd2/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/159f0bd2/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

Reply via email to