How to perform Unit testing on PySpark Structured Streaming?

Viewed 890

I'm using PySpark Structured Streaming with Kafka as a reader stream. For the sake of unit testing, I would like to replace Kafka reader stream with a mock. How can I do this?

The following question is equivalent to mine but I use Python (PySpark) instead of Scala. And I couldn't find MemoryStream in PySpark.

How to perform Unit testing on Spark Structured Streaming?

0 Answers
Related