wForget commented on code in PR #1568: URL: https://github.com/apache/datafusion-comet/pull/1568#discussion_r2011339987
########## spark/src/test/scala/org/apache/comet/exec/CometNativeShuffleSuite.scala: ########## @@ -201,6 +202,23 @@ class CometNativeShuffleSuite extends CometTestBase with AdaptiveSparkPlanHelper } } + test("fix: Comet native shuffle deletes shuffle files after query") { + withParquetTable((0 until 5).map(i => (i, i + 1)), "tbl") { + sql("SELECT count(_2), sum(_2) FROM tbl GROUP BY _1").collect() + val diskBlockManager = SparkEnv.get.blockManager.diskBlockManager + var hasShuffleFiles = true + var counter = 0 + while (hasShuffleFiles && counter < 30) { Review Comment: nit: use [eventually](https://www.scalatest.org/scaladoc/3.2.16/org/scalatest/concurrent/Eventually.html), like: ``` eventually(timeout(30.seconds), interval(1.seconds)) { System.gc() assert(diskBlockManager.getAllFiles().isEmpty) } ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org