cloud-fan commented on code in PR #53579:
URL: https://github.com/apache/spark/pull/53579#discussion_r2649411363


##########
core/src/test/scala/org/apache/spark/SparkTestSuite.scala:
##########
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark
+
+import java.io.File
+import java.nio.charset.StandardCharsets.UTF_8
+import java.nio.file.{Files, Path}
+import java.util.{Locale, TimeZone}
+
+import scala.collection.mutable.ArrayBuffer
+import scala.jdk.CollectionConverters._
+
+import org.apache.logging.log4j._
+import org.apache.logging.log4j.core.{LogEvent, Logger, LoggerContext}
+import org.apache.logging.log4j.core.appender.AbstractAppender
+import org.apache.logging.log4j.core.config.Property
+import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, Failed, Outcome}
+import org.scalatest.TestSuite
+import org.scalatest.concurrent.TimeLimits
+
+import org.apache.spark.deploy.LocalSparkCluster
+import org.apache.spark.internal.Logging
+import org.apache.spark.internal.config.Tests.IS_TESTING
+import org.apache.spark.util.{AccumulatorContext, Utils}
+
+/**
+ * Base abstract class for all unit tests in Spark for handling common 
functionality.
+ *
+ * Thread audit happens normally here automatically when a new test suite 
created.
+ *
+ * It is possible to override the default thread audit behavior by setting 
enableAutoThreadAudit
+ * to false and manually calling the audit methods, if desired. For example:
+ *
+ * class MyTestSuite extends SparkTestSuite {
+ *
+ *   override val enableAutoThreadAudit = false
+ *
+ *   protected override def beforeAll(): Unit = {
+ *     doThreadPreAudit()
+ *     super.beforeAll()
+ *   }
+ *
+ *   protected override def afterAll(): Unit = {
+ *     super.afterAll()
+ *     doThreadPostAudit()
+ *   }
+ * }
+ */
+trait SparkTestSuite

Review Comment:
   can you highlight the difference between this and the previous 
`SparkFunSuite`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to