Skip to content
Snippets Groups Projects
Commit 1bb99c48 authored by Shixiong Zhu's avatar Shixiong Zhu
Browse files

[SPARK-18030][TESTS] Adds more checks to collect more info about FileStreamSourceSuite failure

## What changes were proposed in this pull request?

My hunch is `mkdirs` fails. Just add more checks to collect more info.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <shixiong@databricks.com>

Closes #15577 from zsxwing/SPARK-18030-debug.
parent 2d14ab7e
No related branches found
No related tags found
No related merge requests found
......@@ -664,7 +664,9 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
def createFile(content: String, src: File, tmp: File): Unit = {
val tempFile = Utils.tempFileWith(new File(tmp, "text"))
val finalFile = new File(src, tempFile.getName)
src.mkdirs()
require(!src.exists(), s"$src exists, dir: ${src.isDirectory}, file: ${src.isFile}")
require(src.mkdirs(), s"Cannot create $src")
require(src.isDirectory(), s"$src is not a directory")
require(stringToFile(tempFile, content).renameTo(finalFile))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment