Skip to content

Commit 4198d56

Browse files
committed
Fix unit test
1 parent 2f7c523 commit 4198d56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,9 @@ class FileStreamSourceSuite extends FileStreamSourceTest with SharedSQLContext {
210210

211211
test("FileStreamSource schema: parquet, existing files, no schema") {
212212
withTempDir { src =>
213-
Seq("a", "b", "c").toDS().as("userColumn").toDF()
214-
.write.parquet(new File(src, "1").getCanonicalPath)
213+
Seq("a", "b", "c").toDS().as("userColumn").toDF().write
214+
.mode(org.apache.spark.sql.SaveMode.Overwrite)
215+
.parquet(src.getCanonicalPath)
215216
val schema = createFileStreamSourceAndGetSchema(
216217
format = Some("parquet"), path = Some(src.getCanonicalPath), schema = None)
217218
assert(schema === new StructType().add("value", StringType))

0 commit comments

Comments
 (0)