Repository: spark
Updated Branches:
  refs/heads/branch-2.0 300d596a5 -> e06f43e33


[SPARK-18030][TESTS] Fix flaky FileStreamSourceSuite by not deleting the files

## What changes were proposed in this pull request?

The test `when schema inference is turned on, should read partition data` 
should not delete files because the source maybe is listing files. This PR just 
removes the delete actions since they are not necessary.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <[email protected]>

Closes #15699 from zsxwing/SPARK-18030.

(cherry picked from commit de3f87fa712c305fdd463fc36acffc5418c95c4d)
Signed-off-by: Shixiong Zhu <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e06f43e3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e06f43e3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e06f43e3

Branch: refs/heads/branch-2.0
Commit: e06f43e33ac1650fc401cd90f4123e4dbd23e066
Parents: 300d596
Author: Shixiong Zhu <[email protected]>
Authored: Mon Oct 31 16:05:17 2016 -0700
Committer: Shixiong Zhu <[email protected]>
Committed: Mon Oct 31 16:05:26 2016 -0700

----------------------------------------------------------------------
 .../spark/sql/streaming/FileStreamSourceSuite.scala       | 10 ----------
 1 file changed, 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e06f43e3/sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala
index ca433d5..c1adbc9 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala
@@ -102,12 +102,6 @@ class FileStreamSourceTest extends StreamTest with 
SharedSQLContext with Private
     }
   }
 
-  case class DeleteFile(file: File) extends ExternalAction {
-    def runAction(): Unit = {
-      Utils.deleteRecursively(file)
-    }
-  }
-
   /** Use `format` and `path` to create FileStreamSource via DataFrameReader */
   def createFileStream(
       format: String,
@@ -677,10 +671,6 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
           AddTextFileData("{'value': 'keep5'}", partitionBarSubDir, tmp),
           CheckAnswer(("keep2", "foo"), ("keep3", "foo"), ("keep4", "bar"), 
("keep5", "bar")),
 
-          // Delete the two partition dirs
-          DeleteFile(partitionFooSubDir),
-          DeleteFile(partitionBarSubDir),
-
           AddTextFileData("{'value': 'keep6'}", partitionBarSubDir, tmp),
           CheckAnswer(("keep2", "foo"), ("keep3", "foo"), ("keep4", "bar"), 
("keep5", "bar"),
             ("keep6", "bar"))


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

Reply via email to