srowen commented on a change in pull request #26334: [SPARK-29675][SQL] Add
exception when isolationLevel is Illegal
URL: https://github.com/apache/spark/pull/26334#discussion_r341227320
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
##########
@@ -1649,4 +1649,17 @@ class JDBCSuite extends QueryTest
}
}
}
+
+ test("Add exception when isolationLevel is Illegal") {
+ val e = intercept[IllegalArgumentException] {
+ spark.read.format("jdbc")
+ .option("Url", urlWithUserAndPass)
+ .option("dbTable", "test.people")
+ .option("isolationLevel", "test")
+ .load()
+ }.getMessage
+ assert(e.contains(
+ "Invalid value `test` for parameter `isolationLevel`. This can be " +
Review comment:
You can probably just check for the first sentence rather than depend on
this exact entire string. But it doesn't matter much.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]