kiszk commented on a change in pull request #24080: [SPARK-27147][TEST]Create
new unit test cases for SortShuffleWriter
URL: https://github.com/apache/spark/pull/24080#discussion_r270951831
##########
File path:
core/src/test/scala/org/apache/spark/shuffle/sort/SortShuffleWriterSuite.scala
##########
@@ -90,9 +93,8 @@ class SortShuffleWriterSuite extends SparkFunSuite with
SharedSparkContext with
writer.stop(success = true)
val dataFile = shuffleBlockResolver.getDataFile(shuffleId, 2)
assert(dataFile.exists())
- assert(dataFile.length() !== 0)
- assert(context.taskMetrics().shuffleWriteMetrics.bytesWritten !== 0)
- assert(context.taskMetrics().shuffleWriteMetrics.recordsWritten !== 0)
- Utils.deleteRecursively(dataFile)
+ assert(dataFile.length() !== expected)
Review comment:
`assert(dataFile.length() !== 0)` is too conservative. It would be great to
compare `length()` with the specific value (e.g. as @attilapiros suggestion).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]