Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/19893#discussion_r161322305
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala ---
@@ -17,4 +17,37 @@
package org.apache.spark.sql.test
-trait SharedSQLContext extends SQLTestUtils with SharedSparkSession
+trait SharedSQLContext extends SQLTestUtils with SharedSparkSession {
+
+ /**
+ * Suites extending [[SharedSQLContext]] are sharing resources (eg.
SparkSession) in their tests.
+ * Such resources are initialized by the suite before thread audit takes
thread snapshot and
--- End diff --
I think this is an easier to understand comment about what's going on here:
```
/**
* Suites extending [[SharedSQLContext]] are sharing resources (eg.
SparkSession) in their tests.
* Trat trait initializes the spark session in its [[beforeAll()]]
implementation before the
* automatic thread snapshot is performed, so the audit code could fail
to report threads leaked
* by that shared session.
*
* The behavior is overridden here to take the snapshot before the spark
session is initialized.
*/
```
Sorry for the noise.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]