viirya commented on code in PR #53448:
URL: https://github.com/apache/spark/pull/53448#discussion_r2631929256
##########
python/pyspark/sql/tests/streaming/test_streaming.py:
##########
@@ -147,6 +147,28 @@ def test_stream_trigger(self):
except TypeError:
pass
+ def test_stream_real_time_trigger(self):
+ df =
self.spark.readStream.format("text").load("python/test_support/sql/streaming")
+ tmpPath = tempfile.mkdtemp()
+ shutil.rmtree(tmpPath)
+ self.assertTrue(df.isStreaming)
+ out = os.path.join(tmpPath, "out")
+ chk = os.path.join(tmpPath, "chk")
+ try:
+ q = (
+ df.writeStream.format("console")
+ .trigger(realTime="5 seconds")
+ .option("checkpointLocation", chk)
+ .outputMode("update")
+ .start(out)
+ )
+ q.processAllAvailable()
+ except Exception as e:
+ # This error is expected
+ self._assert_exception_tree_contains_msg(
+ e, "STREAMING_REAL_TIME_MODE.INPUT_STREAM_NOT_SUPPORTED"
Review Comment:
If this input stream is not supported by real time mode, can we possibly
test supported source in Python test?
--
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]