Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11570#discussion_r58414596
  
    --- Diff: project/SparkBuild.scala ---
    @@ -743,8 +744,18 @@ object TestSettings {
         parallelExecution in Test := false,
         // Make sure the test temp directory exists.
         resourceGenerators in Test <+= resourceManaged in Test map { outDir: 
File =>
    -      if (!new File(testTempDir).isDirectory()) {
    -        require(new File(testTempDir).mkdirs())
    +      var dir = new File(testTempDir)
    +      if (!dir.isDirectory()) {
    +        val stack = new Stack[File]()
    +        while (!dir.isDirectory()) {
    +          stack.push(dir)
    +          dir = dir.getParentFile()
    +        }
    +
    +        while (stack.nonEmpty) {
    +          val d = stack.pop()
    +          require(d.mkdir() || d.isDirectory(), s"Failed to create 
directory $d")
    +        }
    --- End diff --
    
    Yes, I've seen tests fail several times on this code and this seems to have 
fixed it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to