Skip to content

Commit

Permalink
[SPARK-16963][SQL] Fix test "StreamExecution metadata garbage collect…
Browse files Browse the repository at this point in the history
…ion"

## What changes were proposed in this pull request?

A follow up PR for apache#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 apache#15661 from zsxwing/fix-StreamingQuerySuite.
  • Loading branch information
zsxwing authored and Robert Kruszewski committed Oct 31, 2016
1 parent 98ed569 commit 6e57014
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class StreamingQuerySuite extends StreamTest with BeforeAndAfter with Logging {
AssertOnQuery("metadata log should contain only two files") { q =>
val metadataLogDir = new java.io.File(q.offsetLog.metadataPath.toString)
val logFileNames = metadataLogDir.listFiles().toSeq.map(_.getName())
val toTest = logFileNames.filter(! _.endsWith(".crc")) // Workaround for SPARK-17475
val toTest = logFileNames.filter(! _.endsWith(".crc")).sorted // Workaround for SPARK-17475
assert(toTest.size == 2 && toTest.head == "1")
true
}
Expand Down

0 comments on commit 6e57014

Please sign in to comment.