LuciferYang commented on a change in pull request #36008:
URL: https://github.com/apache/spark/pull/36008#discussion_r838072204



##########
File path: 
common/network-common/src/test/java/org/apache/spark/network/sasl/SparkSaslSuite.java
##########
@@ -362,7 +345,7 @@ public void testDelegates() throws Exception {
     }
   }
 
-  private static class SaslTestCtx {
+  private static class SaslTestCtx implements AutoCloseable {

Review comment:
       Let `SaslTestCtx` implement the `AutoCloseable`, then we can use 
`try-withresources` in test code

##########
File path: 
common/network-common/src/test/java/org/apache/spark/network/sasl/SparkSaslSuite.java
##########
@@ -362,7 +345,7 @@ public void testDelegates() throws Exception {
     }
   }
 
-  private static class SaslTestCtx {
+  private static class SaslTestCtx implements AutoCloseable {

Review comment:
       Let `SaslTestCtx` implements `AutoCloseable`, then we can use 
`try-withresources` in test code




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