Skip to content

Commit 79fd0cc

Browse files
committed
[SPARK-16963][SQL] Fix test "StreamExecution metadata garbage collection"
## What changes were proposed in this pull request? A follow up PR for #14553 to fix the flaky test. It's flaky because the file list API doesn't guarantee any order of the return list. ## How was this patch tested? Jenkins Author: Shixiong Zhu <shixiong@databricks.com> Closes #15661 from zsxwing/fix-StreamingQuerySuite.
1 parent 0b076d4 commit 79fd0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class StreamingQuerySuite extends StreamTest with BeforeAndAfter with Logging {
265265
AssertOnQuery("metadata log should contain only two files") { q =>
266266
val metadataLogDir = new java.io.File(q.offsetLog.metadataPath.toString)
267267
val logFileNames = metadataLogDir.listFiles().toSeq.map(_.getName())
268-
val toTest = logFileNames.filter(! _.endsWith(".crc")) // Workaround for SPARK-17475
268+
val toTest = logFileNames.filter(! _.endsWith(".crc")).sorted // Workaround for SPARK-17475
269269
assert(toTest.size == 2 && toTest.head == "1")
270270
true
271271
}

0 commit comments

Comments
 (0)