Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhukar525722 committed Oct 26, 2024
1 parent 32551d0 commit b507477
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
}
Expand All @@ -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"))
}
}
Expand Down

0 comments on commit b507477

Please sign in to comment.