HyukjinKwon commented on code in PR #38422:
URL: https://github.com/apache/spark/pull/38422#discussion_r1016104227
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/DataSourceSuite.scala:
##########
@@ -109,18 +109,22 @@ class DataSourceSuite extends SharedSparkSession with
PrivateMethodTester {
}
test("test non existent paths") {
- assertThrows[AnalysisException](
- DataSource.checkAndGlobPathIfNecessary(
- Seq(
- path1.toString,
- path2.toString,
- nonExistentPath.toString
- ),
- hadoopConf,
- checkEmptyGlobPath = true,
- checkFilesExist = true,
- enableGlobbing = true
- )
+ checkError(
+ exception = intercept[AnalysisException](
+ DataSource.checkAndGlobPathIfNecessary(
+ Seq(
+ path1.toString,
+ path2.toString,
+ nonExistentPath.toString
+ ),
+ hadoopConf,
+ checkEmptyGlobPath = true,
+ checkFilesExist = true,
+ enableGlobbing = true
+ )
+ ),
+ errorClass = "PATH_NOT_FOUND",
+ parameters = Map("path" -> "mockFs://mockFs/nonexistentpath")
Review Comment:
@itholic can you use `nonExistentPath` variable here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]