vanzin commented on a change in pull request #25709:
[SPARK-29007][STREAMING][MLLIB][TESTS] Enforce not leaking SparkContext in
tests which creates new StreamingContext with new SparkContext
URL: https://github.com/apache/spark/pull/25709#discussion_r323013174
##########
File path:
streaming/src/test/scala/org/apache/spark/streaming/scheduler/ExecutorAllocationManagerSuite.scala
##########
@@ -19,26 +19,25 @@ package org.apache.spark.streaming.scheduler
import org.mockito.ArgumentMatchers.{eq => meq}
import org.mockito.Mockito.{never, reset, times, verify, when}
-import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, PrivateMethodTester}
+import org.scalatest.{BeforeAndAfterEach, PrivateMethodTester}
import org.scalatest.concurrent.Eventually.{eventually, timeout}
import org.scalatest.mockito.MockitoSugar
import org.scalatest.time.SpanSugar._
-import org.apache.spark.{ExecutorAllocationClient, SparkConf, SparkFunSuite}
+import org.apache.spark.{ExecutorAllocationClient, SparkConf}
import org.apache.spark.internal.config.{DYN_ALLOCATION_ENABLED,
DYN_ALLOCATION_TESTING}
import org.apache.spark.internal.config.Streaming._
-import org.apache.spark.streaming.{DummyInputDStream, Seconds,
StreamingContext}
+import org.apache.spark.streaming.{DummyInputDStream, Seconds,
StreamingContext, TestSuiteBase}
import org.apache.spark.util.{ManualClock, Utils}
-
-class ExecutorAllocationManagerSuite extends SparkFunSuite
- with BeforeAndAfter with BeforeAndAfterAll with MockitoSugar with
PrivateMethodTester {
+class ExecutorAllocationManagerSuite extends TestSuiteBase
+ with BeforeAndAfterEach with MockitoSugar with PrivateMethodTester {
Review comment:
`TestSuiteBase` extends `BeforeAndAfterEach` so adding it again seems
redundant.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]