Github user JoshRosen commented on a diff in the pull request: https://github.com/apache/spark/pull/10376#discussion_r49662046 --- Diff: core/src/test/scala/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriterSuite.scala --- @@ -169,6 +170,41 @@ class BypassMergeSortShuffleWriterSuite extends SparkFunSuite with BeforeAndAfte assert(taskMetrics.memoryBytesSpilled === 0) } + test("only generate temp shuffle file for non-empty partition") { + // Using exception to test whether only non-empty partition creates temp shuffle file, --- End diff -- `temporaryFilesCreated` is only cleared in `afterAll()`, so it should contain every file which was created even after those files are deleted from the disk. Thus, I think we can simplify this test a bit by not relying on the exception here: just check that `temporaryFilesCreated.size === 3` while `temporaryFilesCreated.count(_.exists()) === 0` after a successful stop.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org