[SPARK-25615][SQL][TEST] Improve the test runtime of KafkaSinkSuite: streaming write to non-existing topic
## What changes were proposed in this pull request? Specify `kafka.max.block.ms` to 10 seconds while creating the kafka writer. In the absence of this overridden config, by default it uses a default time out of 60 seconds. With this change the test completes in close to 10 seconds as opposed to 1 minute. ## How was this patch tested? This is a test fix. Closes #22671 from dilipbiswal/SPARK-25615. Authored-by: Dilip Biswal <dbiswal@us.ibm.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
This commit is contained in:
parent
1bb63ae512
commit
adf648b5be
|
@ -427,6 +427,7 @@ class KafkaSinkSuite extends StreamTest with SharedSQLContext with KafkaTest {
|
|||
.format("kafka")
|
||||
.option("checkpointLocation", checkpointDir.getCanonicalPath)
|
||||
.option("kafka.bootstrap.servers", testUtils.brokerAddress)
|
||||
.option("kafka.max.block.ms", "5000")
|
||||
.queryName("kafkaStream")
|
||||
withTopic.foreach(stream.option("topic", _))
|
||||
withOutputMode.foreach(stream.outputMode(_))
|
||||
|
|
Loading…
Reference in a new issue