diff options
author | Shixiong Zhu <shixiong@databricks.com> | 2016-10-20 20:44:32 -0700 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2016-10-20 20:44:32 -0700 |
commit | 1bb99c4887e97ae5f55c8c2b392ba5ca72d6168b (patch) | |
tree | e317e57f85f3835cefa82ca06c19de2468a3fa50 /sql/core | |
parent | 2d14ab7e644b64ff911772e71f42653ba949cb07 (diff) | |
download | spark-1bb99c4887e97ae5f55c8c2b392ba5ca72d6168b.tar.gz spark-1bb99c4887e97ae5f55c8c2b392ba5ca72d6168b.tar.bz2 spark-1bb99c4887e97ae5f55c8c2b392ba5ca72d6168b.zip |
[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.
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala | 4 |
1 files changed, 3 insertions, 1 deletions
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 aabdccaaf3..b9e9da9a1e 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 @@ -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)) } |