You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/04/23 16:48:23 UTC
kylin git commit: KYLIN-1615 UT 'HiveCmdBuilderTest' fail on
'testBeeline'
Repository: kylin
Updated Branches:
refs/heads/master 8045e7d81 -> 4e169ecaf
KYLIN-1615 UT 'HiveCmdBuilderTest' fail on 'testBeeline'
Signed-off-by: wangxianbin1987 <wa...@gmail.com>
Signed-off-by: lidongsjtu <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4e169eca
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4e169eca
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4e169eca
Branch: refs/heads/master
Commit: 4e169ecaf75714f5a5a937cedfd08b5c20a3fdf7
Parents: 8045e7d
Author: wangxianbin1987 <wa...@gmail.com>
Authored: Sat Apr 23 22:31:50 2016 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Sat Apr 23 22:44:28 2016 +0800
----------------------------------------------------------------------
.../java/org/apache/kylin/source/hive/HiveCmdBuilderTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/4e169eca/source-hive/src/test/java/org/apache/kylin/source/hive/HiveCmdBuilderTest.java
----------------------------------------------------------------------
diff --git a/source-hive/src/test/java/org/apache/kylin/source/hive/HiveCmdBuilderTest.java b/source-hive/src/test/java/org/apache/kylin/source/hive/HiveCmdBuilderTest.java
index 83c50c0..f780efc 100644
--- a/source-hive/src/test/java/org/apache/kylin/source/hive/HiveCmdBuilderTest.java
+++ b/source-hive/src/test/java/org/apache/kylin/source/hive/HiveCmdBuilderTest.java
@@ -56,6 +56,8 @@ public class HiveCmdBuilderTest {
@Test
public void testBeeline() throws IOException {
+ String lineSeparator = java.security.AccessController.doPrivileged(
+ new sun.security.action.GetPropertyAction("line.separator"));
System.setProperty("kylin.hive.client", "beeline");
System.setProperty("kylin.hive.beeline.params", "-u jdbc_url");
@@ -69,7 +71,9 @@ public class HiveCmdBuilderTest {
String hqlFile = cmd.substring(cmd.lastIndexOf("-f ") + 3).trim();
String hqlStatement = FileUtils.readFileToString(new File(hqlFile));
- assertEquals("USE default;\nDROP TABLE test;\nSHOW\n TABLES;\n", hqlStatement);
+ assertEquals("USE default;" +
+ lineSeparator + "DROP TABLE test;" +
+ lineSeparator + "SHOW\n TABLES;" + lineSeparator, hqlStatement);
FileUtils.forceDelete(new File(hqlFile));
}