cloud-fan commented on code in PR #57606:
URL: https://github.com/apache/spark/pull/57606#discussion_r3735901013


##########
sql/connect/server/src/test/scala/org/apache/spark/sql/connect/SparkSessionBinder.scala:
##########
@@ -60,14 +61,15 @@ trait SparkSessionBinder extends sql.SparkSessionBinder { 
self: SparkFunSuite =>
       .builder()
       .client(client)
       .create()
+    super.beforeAll()
   }
 
   override def afterAll(): Unit = {
+    super.afterAll()

Review Comment:
   Please keep cleanup in a `finally` block after invoking the suite hooks. If 
`super.afterAll()` throws (including from the new suite's SQL assertion), this 
method now skips closing `_connectSpark` and stopping the global service, which 
can contaminate later suites. The classic binder preserves this guarantee with 
`try`/`finally`.



-- 
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