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

    https://github.com/apache/spark/pull/13454#discussion_r65628611
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/SchedulerIntegrationSuite.scala 
---
    @@ -133,6 +133,11 @@ abstract class SchedulerIntegrationSuite[T <: 
MockBackend: ClassTag] extends Spa
           // when the job succeeds
           assert(taskScheduler.runningTaskSets.isEmpty)
           assert(!backend.hasTasks)
    +    } else {
    +      // Note that we CANNOT check for empty results on a failure -- the 
resultHandler will
    --- End diff --
    
    It's hard to correlate this comment with the code around it. It seems like 
it belongs in the call site, where the `results` list was actually being 
checked (and you removed the assert). But without the assert, the comment would 
be out of place there too.
    
    I just find it very improbable that someone will read this comment when 
writing a test. It would help if, instead, the expected results were passed to 
this method, so that the asserts happen here instead of in the body of every 
test. Then the comment is fine where it is, because this method would handle 
the asserts (or lack thereof).
    
    Also, the same assert exists in the "job failure after 4 attempts" test in 
`SchedulerIntegrationSuite`. Doesn't that need to change too?


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

Reply via email to