File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
kyuubi-server/src/test/scala/org/apache/kyuubi/operation Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -67,12 +67,13 @@ class KyuubiOperationPerGroupSuite extends WithKyuubiServer with SparkQueryTests
67
67
assert(r1.startsWith(s " kyuubi_GROUP_ ${conf.get(KyuubiConf .ENGINE_TYPE )}_testGG " ))
68
68
}
69
69
70
- test(" kyuubi defined function - session_user" ) {
71
- withSessionConf(Map (" hive.server2.proxy.user" -> " user1 " ))(Map .empty)(Map .empty) {
70
+ test(" kyuubi defined function - system_user/ session_user" ) {
71
+ withSessionConf(Map (" hive.server2.proxy.user" -> " user2 " ))(Map .empty)(Map .empty) {
72
72
withJdbcStatement() { statement =>
73
- val res = statement.executeQuery(" select session_user() as c2" )
73
+ val res = statement.executeQuery(" select system_user() as c1, session_user() as c2" )
74
74
assert(res.next())
75
- assert(res.getString(" c2" ) === " user1" )
75
+ assert(res.getString(" c1" ) === " user1" )
76
+ assert(res.getString(" c2" ) === " user2" )
76
77
}
77
78
}
78
79
}
@@ -83,8 +84,8 @@ class KyuubiOperationPerGroupSuite extends WithKyuubiServer with SparkQueryTests
83
84
KyuubiConf .PREFERRED_GROUP .key -> " group_tt" ))(Map .empty)(Map .empty) {
84
85
withJdbcStatement() { statement =>
85
86
val res = statement.executeQuery(" set spark.app.name" )
86
- val engineName = res.getString(" value" )
87
87
assert(res.next())
88
+ val engineName = res.getString(" value" )
88
89
assert(engineName.startsWith(s " kyuubi_GROUP_ ${conf.get(KyuubiConf .ENGINE_TYPE )}_group_tt " ))
89
90
}
90
91
}
You can’t perform that action at this time.
0 commit comments