chaoqin-li1123 commented on code in PR #46481: URL: https://github.com/apache/spark/pull/46481#discussion_r1594551803
########## sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonStreamingDataSourceSuite.scala: ########## @@ -326,8 +326,11 @@ class PythonStreamingDataSourceSuite extends PythonDataSourceSuiteBase { lastBatch = q.lastProgress.batchId.toInt } assert(lastBatch > 20) + val rowCount = spark.read.format("json").load(outputDir.getAbsolutePath).count() + // There may be one uncommitted batch that is not recorded in query progress. + assert(rowCount == 2 * lastBatch + 2 || rowCount == 2 * lastBatch + 4) Review Comment: Unfortunately there is no graceful way to shutdown a streaming query. I can't think of any alternative. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org