Repository: kylin Updated Branches: refs/heads/yang-m1 aef842442 -> 6ff4b940e
KYLIN-1596 UT fail, due to String encoding CharsetEncoder mismatch Signed-off-by: wangxianbin1987 <wangxianbin1...@gmail.com> Signed-off-by: Hongbin Ma <mahong...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6ff4b940 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6ff4b940 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6ff4b940 Branch: refs/heads/yang-m1 Commit: 6ff4b940ef7c723cfb7f9c2508e8759992fdea2c Parents: aef8424 Author: wangxianbin1987 <wangxianbin1...@gmail.com> Authored: Tue Apr 19 10:04:02 2016 +0800 Committer: Hongbin Ma <mahong...@apache.org> Committed: Tue Apr 19 10:23:46 2016 +0800 ---------------------------------------------------------------------- .../apache/kylin/invertedindex/InvertedIndexLocalTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/6ff4b940/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java ---------------------------------------------------------------------- diff --git a/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java b/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java index 4b74fdd..5aff1b0 100644 --- a/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java +++ b/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals; import java.io.File; import java.io.FileInputStream; import java.io.IOException; +import java.io.UnsupportedEncodingException; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; @@ -171,7 +172,11 @@ public class InvertedIndexLocalTest extends LocalFileMetadataTestCase { @Nullable @Override public byte[] apply(String input) { - return input.getBytes(); + try { + return input.getBytes("UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } } }))); }