cloud-fan commented on code in PR #36704:
URL: https://github.com/apache/spark/pull/36704#discussion_r891099418
##########
connector/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchSourceSuite.scala:
##########
@@ -666,9 +667,10 @@ abstract class KafkaMicroBatchSourceSuiteBase extends
KafkaSourceSuiteBase {
testUtils.sendMessages(topic2, Array("6"))
},
StartStream(),
- ExpectFailure[IllegalStateException](e => {
+ ExpectFailure[SparkException](e => {
+ assert(e.asInstanceOf[SparkThrowable].getErrorClass ===
"INTERNAL_ERROR")
// The offset of `topic2` should be changed from 2 to 1
- assert(e.getMessage.contains("was changed from 2 to 1"))
+ assert(e.getCause.getMessage.contains("was changed from 2 to 1"))
Review Comment:
I'm looking into this test and feels like this should be a user-facing error
as users can trigger it with valid queries. @HeartSaVioR what do you think?
##########
connector/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchSourceSuite.scala:
##########
@@ -666,9 +667,10 @@ abstract class KafkaMicroBatchSourceSuiteBase extends
KafkaSourceSuiteBase {
testUtils.sendMessages(topic2, Array("6"))
},
StartStream(),
- ExpectFailure[IllegalStateException](e => {
+ ExpectFailure[SparkException](e => {
+ assert(e.asInstanceOf[SparkThrowable].getErrorClass ===
"INTERNAL_ERROR")
// The offset of `topic2` should be changed from 2 to 1
- assert(e.getMessage.contains("was changed from 2 to 1"))
+ assert(e.getCause.getMessage.contains("was changed from 2 to 1"))
Review Comment:
I'm looking into this test and feel like this should be a user-facing error
as users can trigger it with valid queries. @HeartSaVioR what do you think?
--
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]