Updated Branches:
  refs/heads/flume-1.3.1 [created] 42ec5fb76

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

Branch: refs/heads/flume-1.3.1
Commit: 42ec5fb76797e4dc2656aa382e94ff502b8f51f7
Parents: d524a61
Author: Brock Noland <[email protected]>
Authored: Wed Dec 19 10:44:29 2012 -0600
Committer: Hari Shreedharan <[email protected]>
Committed: Thu Dec 20 00:14:29 2012 -0800

----------------------------------------------------------------------
 .../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/42ec5fb7/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/42ec5fb7/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/42ec5fb7/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/42ec5fb7/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