Repository: flume
Updated Branches:
  refs/heads/flume-1.6 bd7acb49e -> c0b3f70ed


FLUME-2481. TestFileChannelEncryption fails with System locale other than en_US

(Santiago M. Mola via Hari)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/c0b3f70e
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/c0b3f70e
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/c0b3f70e

Branch: refs/heads/flume-1.6
Commit: c0b3f70ed8b8bac26c5a0fc615e271f592f3b3e3
Parents: bd7acb4
Author: Hari Shreedharan <[email protected]>
Authored: Wed Oct 1 22:23:15 2014 -0700
Committer: Hari Shreedharan <[email protected]>
Committed: Wed Oct 1 22:24:05 2014 -0700

----------------------------------------------------------------------
 .../channel/file/encryption/TestFileChannelEncryption.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/c0b3f70e/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/TestFileChannelEncryption.java
----------------------------------------------------------------------
diff --git 
a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/TestFileChannelEncryption.java
 
b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/TestFileChannelEncryption.java
index 6ea1216..d4537a8 100644
--- 
a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/TestFileChannelEncryption.java
+++ 
b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/encryption/TestFileChannelEncryption.java
@@ -307,8 +307,8 @@ public class TestFileChannelEncryption extends 
TestFileChannelBase {
       channel = createFileChannel(overrides);
       Assert.fail();
     } catch(RuntimeException ex) {
-      Assert.assertEquals("java.io.FileNotFoundException: /path/does/not/exist 
" +
-          "(No such file or directory)", ex.getMessage());
+      Assert.assertTrue("Exception message is incorrect: " + ex.getMessage(),
+          ex.getMessage().startsWith("java.io.FileNotFoundException: 
/path/does/not/exist "));
     }
   }
   @Test
@@ -322,8 +322,8 @@ public class TestFileChannelEncryption extends 
TestFileChannelBase {
       channel = createFileChannel(overrides);
       Assert.fail();
     } catch(RuntimeException ex) {
-      Assert.assertEquals("java.io.FileNotFoundException: /path/does/not/exist 
" +
-          "(No such file or directory)", ex.getMessage());
+      Assert.assertTrue("Exception message is incorrect: " + ex.getMessage(),
+          ex.getMessage().startsWith("java.io.FileNotFoundException: 
/path/does/not/exist "));
     }
   }
   @Test

Reply via email to