You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/01 16:32:37 UTC
[GitHub] [spark] kiszk commented on a change in pull request #24080:
[SPARK-27147][TEST]Create new unit test cases for SortShuffleWriter
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org