LuciferYang commented on code in PR #40737:
URL: https://github.com/apache/spark/pull/40737#discussion_r1162364558
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala:
##########
@@ -2071,7 +2071,10 @@ abstract class DDLSuite extends QueryTest with
DDLSuiteBase {
}
test(s"Add a directory when
${SQLConf.LEGACY_ADD_SINGLE_FILE_IN_ADD_FILE.key} set to false") {
- val directoryToAdd = Utils.createTempDir("/tmp/spark/addDirectory/")
+ // SPARK-43093: Don't use `withTempDir` to clean up temp dir, it will
cause test cases in
+ // shared session that need to execute `Executor.updateDependencies` test
fail.
+ val directoryToAdd = Utils.createDirectory(
+ root = Utils.createTempDir().getCanonicalPath, namePrefix =
"addDirectory")
Review Comment:
Use `Utils.createTempDir().getCanonicalPath` as root of `directoryToAdd`,
then `o.a.spark.util.ShutdownHookManager` will clean up temp dir from the root
of `directoryToAdd`.
--
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]