From b50747703ccb7dff51ca471b0b8f2d9c3a8710df Mon Sep 17 00:00:00 2001 From: madlnu Date: Sat, 26 Oct 2024 09:05:31 +0530 Subject: [PATCH] test fix --- .../operation/KyuubiOperationPerGroupSuite.scala | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerGroupSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerGroupSuite.scala index edceb49e08b..1938236dd0f 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerGroupSuite.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerGroupSuite.scala @@ -67,12 +67,13 @@ class KyuubiOperationPerGroupSuite extends WithKyuubiServer with SparkQueryTests assert(r1.startsWith(s"kyuubi_GROUP_${conf.get(KyuubiConf.ENGINE_TYPE)}_testGG")) } - test("kyuubi defined function - session_user") { - withSessionConf(Map("hive.server2.proxy.user" -> "user1"))(Map.empty)(Map.empty) { + test("kyuubi defined function - system_user/session_user") { + withSessionConf(Map("hive.server2.proxy.user" -> "user2"))(Map.empty)(Map.empty) { withJdbcStatement() { statement => - val res = statement.executeQuery("select session_user() as c2") + val res = statement.executeQuery("select system_user() as c1, session_user() as c2") assert(res.next()) - assert(res.getString("c2") === "user1") + assert(res.getString("c1") === "user1") + assert(res.getString("c2") === "user2") } } } @@ -83,8 +84,8 @@ class KyuubiOperationPerGroupSuite extends WithKyuubiServer with SparkQueryTests KyuubiConf.PREFERRED_GROUP.key -> "group_tt"))(Map.empty)(Map.empty) { withJdbcStatement() { statement => val res = statement.executeQuery("set spark.app.name") - val engineName = res.getString("value") assert(res.next()) + val engineName = res.getString("value") assert(engineName.startsWith(s"kyuubi_GROUP_${conf.get(KyuubiConf.ENGINE_TYPE)}_group_tt")) } }