Local jobs post SparkListenerJobEnd, and DAGScheduler data structure
cleanup always occurs before any posting of SparkListenerJobEnd.
Wait for SparkListenerJobEnd before checking DAGScheduler end state