diff --git a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala index 8add80b583d..6feb63eb95c 100644 --- a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala +++ b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala @@ -188,8 +188,8 @@ abstract class RangerSparkExtensionSuite extends AnyFunSuite val e = intercept[AccessControlException](sql(create)) assert(e.getMessage === errorMessage("create", "mydb")) withCleanTmpResources(Seq((testDb, "database"))) { - doAs(admin, assert(Try {sql(create)}.isSuccess)) - doAs(admin, assert(Try {sql(alter)}.isSuccess)) + doAs(admin, assert(Try { sql(create) }.isSuccess)) + doAs(admin, assert(Try { sql(alter) }.isSuccess)) val e1 = intercept[AccessControlException](sql(alter)) assert(e1.getMessage === errorMessage("alter", "mydb")) val e2 = intercept[AccessControlException](sql(drop)) @@ -211,14 +211,14 @@ abstract class RangerSparkExtensionSuite extends AnyFunSuite assert(e.getMessage === errorMessage("create")) withCleanTmpResources(Seq((s"$db.$table", "table"))) { - doAs(bob, assert(Try {sql(create0)}.isSuccess)) - doAs(bob, assert(Try {sql(alter0)}.isSuccess)) + doAs(bob, assert(Try { sql(create0) }.isSuccess)) + doAs(bob, assert(Try { sql(alter0) }.isSuccess)) val e1 = intercept[AccessControlException](sql(drop0)) assert(e1.getMessage === errorMessage("drop")) - doAs(bob, assert(Try {sql(alter0)}.isSuccess)) - doAs(bob, assert(Try {sql(select).collect()}.isSuccess)) - doAs(kent, assert(Try {sql(s"SELECT key FROM $db.$table").collect()}.isSuccess)) + doAs(bob, assert(Try { sql(alter0) }.isSuccess)) + doAs(bob, assert(Try { sql(select).collect() }.isSuccess)) + doAs(kent, assert(Try { sql(s"SELECT key FROM $db.$table").collect() }.isSuccess)) Seq( select, @@ -598,12 +598,12 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite { // query all columns of the permanent view // with access privileges to the permanent view but no privilege to the source table val sql1 = s"SELECT * FROM $db1.$permView" - doAs(userPermViewOnly, {sql(sql1).collect()}) + doAs(userPermViewOnly, { sql(sql1).collect() }) // query the second column of permanent view with multiple columns // with access privileges to the permanent view but no privilege to the source table val sql2 = s"SELECT name FROM $db1.$permView" - doAs(userPermViewOnly, {sql(sql2).collect()}) + doAs(userPermViewOnly, { sql(sql2).collect() }) } }