Skip to content

Commit da8d48d

Browse files
committed
[SPARK-31935][SQL][TESTS][FOLLOWUP] Fix the test case for Hadoop2/3
This PR updates the test case to accept Hadoop 2/3 error message correctly. SPARK-31935(#28760) breaks Hadoop 3.2 UT because Hadoop 2 and Hadoop 3 have different exception messages. In #28791, there are two test suites missed the fix No Unit test Closes #28796 from gengliangwang/SPARK-31926-followup. Authored-by: Gengliang Wang <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 5623228 commit da8d48d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,11 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
536536
withTempDir { dir =>
537537
val path = dir.getCanonicalPath
538538
val defaultFs = "nonexistFS://nonexistFS"
539-
val expectMessage = "No FileSystem for scheme: nonexistFS"
539+
val expectMessage = "No FileSystem for scheme nonexistFS"
540540
val message = intercept[java.io.IOException] {
541541
spark.readStream.option("fs.defaultFS", defaultFs).text(path)
542542
}.getMessage
543-
assert(message == expectMessage)
543+
assert(message.filterNot(Set(':', '"').contains) == expectMessage)
544544
}
545545
}
546546

0 commit comments

Comments
 (0)