robreeves commented on a change in pull request #35637:
URL: https://github.com/apache/spark/pull/35637#discussion_r816913951



##########
File path: core/src/test/scala/org/apache/spark/status/AppStatusStoreSuite.scala
##########
@@ -227,32 +268,41 @@ class AppStatusStoreSuite extends SparkFunSuite {
     liveTask.write(store.asInstanceOf[ElementTrackingStore], 1L)
   }
 
-  private def getTaskMetrics(i: Int): TaskMetrics = {
+  /**
+   * Creates fake task metrics
+   * @param seed The random seed. The output will be reproducible for a given 
seed.
+   * @return The test metrics object with fake data
+   */

Review comment:
       The previous version of the test set every metric to the same value. 
This left a gap in test coverage where the test would pass if the code 
accidentally used the wrong metric (an easy mistake to make). This improves the 
test coverage be eliminating this gap because every metric has unique values. 
This is important because I expanded the test to check every metric, instead of 
just `executorRunTime` like before.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to