Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/5473#discussion_r29319359
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/ui/StreamingJobProgressListenerSuite.scala
---
@@ -64,13 +68,64 @@ class StreamingJobProgressListenerSuite extends
TestSuiteBase with Matchers {
listener.numTotalProcessedRecords should be (0)
listener.numTotalReceivedRecords should be (600)
+ // onJobStart
+ val properties1 = new Properties()
+ properties1.setProperty(JobScheduler.BATCH_TIME_PROPERTY_KEY,
Time(1000).milliseconds.toString)
+ properties1.setProperty(JobScheduler.OUTPUT_OP_ID_PROPERTY_KEY,
0.toString)
+ val jobStart1 = SparkListenerJobStart(jobId = 0,
+ 0L, // unused
+ Nil, // unused
+ properties1)
+ listener.onJobStart(jobStart1)
+
+ val properties2 = new Properties()
+ properties2.setProperty(JobScheduler.BATCH_TIME_PROPERTY_KEY,
Time(1000).milliseconds.toString)
+ properties2.setProperty(JobScheduler.OUTPUT_OP_ID_PROPERTY_KEY,
0.toString)
+ val jobStart2 = SparkListenerJobStart(jobId = 1,
+ 0L, // unused
+ Nil, // unused
+ properties2)
+ listener.onJobStart(jobStart2)
+
+ val properties3 = new Properties()
+ properties3.setProperty(JobScheduler.BATCH_TIME_PROPERTY_KEY,
Time(1000).milliseconds.toString)
--- End diff --
Please put these two lines for setting the properties in a function. Will
reduce duplicate code a lot.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]