Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2968#discussion_r20048069
  
    --- Diff: 
core/src/test/scala/org/apache/spark/metrics/InputOutputMetricsSuite.scala ---
    @@ -73,4 +78,32 @@ class InputMetricsSuite extends FunSuite with 
SharedSparkContext {
         assert(taskBytesRead.length == 2)
         assert(taskBytesRead.sum >= file.length())
       }
    +
    +  test("output metrics when writing text file") {
    +    val fs = FileSystem.getLocal(new Configuration())
    +    val outPath = new Path(fs.getWorkingDirectory, "outdir")
    +
    +    if (SparkHadoopUtil.get.getFSBytesWrittenOnThreadCallback(outPath, 
fs.getConf).isDefined) {
    --- End diff --
    
    This test is a little hairy because it could break without anyone noticing 
(since I don't think Jenkins runs a new enough version for this code to be 
run?).  But I don't have a great solution -- you could mock out a bunch of the 
function calls, but then you're left not really testing anything.


---
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

Reply via email to