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

    https://github.com/apache/spark/pull/21639#discussion_r206697727
  
    --- Diff: core/src/main/scala/org/apache/spark/TestUtils.scala ---
    @@ -233,6 +233,21 @@ private[spark] object TestUtils {
         }
       }
     
    +  /**
    +   * Runs some code with the given listener installed in the SparkContext. 
After the code runs,
    +   * this method will wait until all events posted to the listener bus are 
processed, and then
    +   * remove the listener from the bus.
    +   */
    +  def withListener[L <: SparkListener](sc: SparkContext, listener: L) 
(body: L => Unit): Unit = {
    --- End diff --
    
    private? hardly matters.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to