pan3793 commented on code in PR #7187:
URL: https://github.com/apache/kyuubi/pull/7187#discussion_r2605248153


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala:
##########
@@ -272,13 +302,21 @@ abstract class RangerSparkExtensionSuite extends 
AnyFunSuite
   test("auth: functions") {
     val db = defaultDb
     val func = "func"
-    val create0 = s"CREATE FUNCTION IF NOT EXISTS $db.$func AS 'abc.mnl.xyz'"
-    doAs(
-      kent, {
-        val e = intercept[AccessControlException](sql(create0))
-        assert(e.getMessage === errorMessage("create", "default/func"))
-      })
-    doAs(admin, assert(Try(sql(create0)).isSuccess))
+    withCleanTmpResources(Seq(
+      (func, "function"))) {
+      val create0 = s"CREATE FUNCTION IF NOT EXISTS $db.$func AS 'abc.mnl.xyz'"
+      doAs(
+        bob, {
+          val e = intercept[AccessControlException](sql(create0))
+          assert(e.getMessage === errorMessage("create", s"$db/$func"))
+        })

Review Comment:
   prefer to use the alternative for multi-line body
   ```suggestion
         doAs(bob) {
           val e = intercept[AccessControlException](sql(create0))
           assert(e.getMessage === errorMessage("create", s"$db/$func"))
         }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to