@@ -21,7 +21,6 @@ import java.io.{File, InterruptedIOException, IOException, UncheckedIOException}
21
21
import java .nio .channels .ClosedByInterruptException
22
22
import java .util .concurrent .{CountDownLatch , ExecutionException , TimeoutException , TimeUnit }
23
23
24
- import scala .collection .mutable
25
24
import scala .reflect .ClassTag
26
25
import scala .util .control .ControlThrowable
27
26
@@ -30,7 +29,7 @@ import org.apache.commons.io.FileUtils
30
29
import org .apache .hadoop .conf .Configuration
31
30
32
31
import org .apache .spark .{SparkContext , SparkEnv }
33
- import org .apache .spark .scheduler .{SparkListener , SparkListenerJobStart , SparkListenerTaskEnd , SparkListenerTaskStart }
32
+ import org .apache .spark .scheduler .{SparkListener , SparkListenerJobStart }
34
33
import org .apache .spark .sql ._
35
34
import org .apache .spark .sql .catalyst .plans .logical .Range
36
35
import org .apache .spark .sql .catalyst .streaming .InternalOutputModes
@@ -246,29 +245,6 @@ class ContinuousSuite extends ContinuousSuiteBase {
246
245
class ContinuousStressSuite extends ContinuousSuiteBase {
247
246
import testImplicits ._
248
247
249
- // Continuous processing tasks end asynchronously, so test that they actually end.
250
- private val tasksEndedListener = new SparkListener () {
251
- val activeTaskIds = mutable.Set [Long ]()
252
-
253
- override def onTaskStart (start : SparkListenerTaskStart ): Unit = {
254
- activeTaskIds.add(start.taskInfo.taskId)
255
- }
256
-
257
- override def onTaskEnd (end : SparkListenerTaskEnd ): Unit = {
258
- activeTaskIds.remove(end.taskInfo.taskId)
259
- }
260
- }
261
- override def beforeEach (): Unit = {
262
- spark.sparkContext.addSparkListener(tasksEndedListener)
263
- }
264
-
265
- override def afterEach (): Unit = {
266
- eventually(timeout(streamingTimeout)) {
267
- assert(tasksEndedListener.activeTaskIds.isEmpty)
268
- }
269
- spark.sparkContext.removeSparkListener(tasksEndedListener)
270
- }
271
-
272
248
test(" only one epoch" ) {
273
249
val df = spark.readStream
274
250
.format(" rate" )
0 commit comments