HeartSaVioR commented on a change in pull request #26292: [SPARK-29635][SS]
Extract base test suites between Kafka micro-batch sink and Kafka continuous
sink
URL: https://github.com/apache/spark/pull/26292#discussion_r339956480
##########
File path:
external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSinkSuite.scala
##########
@@ -97,159 +108,123 @@ class KafkaSinkStreamingSuite extends
KafkaSinkSuiteBase with StreamTest {
.map(_._2)
try {
- input.addData("1", "2", "3", "4", "5")
- failAfter(streamingTimeout) {
- writer.processAllAvailable()
- }
- checkDatasetUnorderly(reader, 1, 2, 3, 4, 5)
- input.addData("6", "7", "8", "9", "10")
- failAfter(streamingTimeout) {
- writer.processAllAvailable()
- }
- checkDatasetUnorderly(reader, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+ input.addData(1, 2, 3, 4, 5)
+ verifyResult(writer)(checkDatasetUnorderly(reader, 1, 2, 3, 4, 5))
+ input.addData(6, 7, 8, 9, 10)
+ verifyResult(writer)(checkDatasetUnorderly(reader, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10))
} finally {
writer.stop()
}
}
- test("streaming - write aggregation w/o topic field, with topic option") {
Review comment:
We simplify the query because aggregation is not needed for testing origin
intention, as well as aggregation is not supported in continuous mode.
----------------------------------------------------------------
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]