Skip to content

Commit

Permalink
[SPARK-33358][SQL] Add test case for CLI should break when have comma…
Browse files Browse the repository at this point in the history
…nd failed
  • Loading branch information
artiship committed Nov 6, 2020
1 parent 50e011b commit 46d615e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,4 +571,13 @@ class CliSuite extends SparkFunSuite with BeforeAndAfterAll with Logging {
// the date formatter for `java.sql.LocalDate` must output negative years with sign.
runCliWithin(1.minute)("SELECT MAKE_DATE(-44, 3, 15);" -> "-0044-03-15")
}

test("SPARK-33358 CLI should break when have command failed") {
runCliWithin(timeout = 2.minute,
errorResponses = Seq("AnalysisException"))(
"select * from nonexistent_table;" +
"select 1;"
-> "Error in query: Table or view not found: nonexistent_table;"
)
}
}

0 comments on commit 46d615e

Please sign in to comment.