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

    https://github.com/apache/spark/pull/16335#discussion_r93012576
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLogSuite.scala
 ---
    @@ -209,14 +209,24 @@ class HDFSMetadataLogSuite extends SparkFunSuite with 
SharedSQLContext {
         }
     
         // Open and delete
    -    val f1 = fm.open(path)
    -    fm.delete(path)
    -    assert(!fm.exists(path))
    -    intercept[IOException] {
    -      fm.open(path)
    +    def closeOnWindows[R <: Closeable](res: => R)(f: => Unit): Unit = {
    +      if (Utils.isWindows) {
    +        // Windows does not allow deleting opened files.
    +        res.close()
    --- End diff --
    
    Should we not try to close open file handles in any event, everywhere? It 
doesn't feel like this must be specific to Windows, even if it only is a 
problem on Windows.


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