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

    https://github.com/apache/spark/pull/9132#discussion_r42203589
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
 ---
    @@ -309,7 +309,22 @@ class SQLListenerSuite extends SparkFunSuite with 
SharedSQLContext {
         assert(executionUIData.failedJobs === Seq(0))
       }
     
    -  ignore("no memory leak") {
    +  test("SPARK-11126: no memory leak when running non SQL jobs") {
    +    val previousStageNumber = 
sqlContext.listener.stageIdToStageMetrics.size
    +    sqlContext.sparkContext.parallelize(1 to 10).foreach(i => ())
    +    // listener should ignore the non SQL stage
    +    assert(sqlContext.listener.stageIdToStageMetrics.size == 
previousStageNumber)
    +
    +    sqlContext.sparkContext.parallelize(1 to 10).toDF().foreach(i => ())
    +    // listener should save the SQL stage
    +    assert(sqlContext.listener.stageIdToStageMetrics.size == 
previousStageNumber + 1)
    +  }
    +
    +}
    +
    +class SQLListenerMemoryLeakSuite extends SparkFunSuite {
    +
    +  test("no memory leak") {
    --- End diff --
    
    I moved this test to `SQLListenerMemoryLeakSuite` and enabled it because it 
needs to create a new SparkContext.


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