xkrogen commented on pull request #32810:
URL: https://github.com/apache/spark/pull/32810#issuecomment-867938150


   Thanks @tgravescs , that's a good point. I was unable to reproduce the test 
failure locally, and the other plugin-related tests are fine. Re-kicking the 
test builds again to be sure.
   
   Looks like the test failure is coming from here:
   ```
         eventually(timeout(10.seconds), interval(100.millis)) {
           children = dir.listFiles()
           assert(children != null)
           // we have 2 discovery scripts and then expect 1 driver and 1 
executor file
           assert(children.length >= 4)
         }
         val execFiles =
           
children.filter(_.getName.startsWith(NonLocalModeSparkPlugin.executorFileStr))
         assert(execFiles.size === 1)
         val allLines = Files.readLines(execFiles(0), StandardCharsets.UTF_8)
         assert(allLines.size === 1) // <- fails here
   ```
   Looks to me like the issue is that the `eventually` is waiting for all of 
the files to be present (`children.length >= 4`), but we don't wait for the 
content to be ready. Instead, we assume that as soon as the file exists, it's 
safe to read the content. I can create another JIRA to fix this if you agree.


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

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