Repository: flume Updated Branches: refs/heads/trunk d2cb4ba75 -> e1e5acea2
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/e1e5acea Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/e1e5acea Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/e1e5acea Branch: refs/heads/trunk Commit: e1e5acea2fbb04699eba76ea930def38e34f328d Parents: d2cb4ba Author: Hari Shreedharan <[email protected]> Authored: Wed Oct 1 22:23:15 2014 -0700 Committer: Hari Shreedharan <[email protected]> Committed: Wed Oct 1 22:23:15 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/e1e5acea/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
