@@ -343,7 +343,7 @@ class CheckpointSuite extends TestSuiteBase {
343343 withStreamingContext(new StreamingContext (conf, batchDuration)) { ssc =>
344344 ssc.checkpoint(checkpointDir)
345345 clock = ssc.scheduler.clock.asInstanceOf [ManualClock ]
346- val waiter = new StreamingTestWaiter (ssc)
346+ val batchCounter = new BatchCounter (ssc)
347347 val fileStream = ssc.textFileStream(testDir.toString)
348348 // Make value 3 take a large time to process, to ensure that the driver
349349 // shuts down in the middle of processing the 3rd batch
@@ -374,14 +374,14 @@ class CheckpointSuite extends TestSuiteBase {
374374 if (i != 3 ) {
375375 // Since we want to shut down while the 3rd batch is processing
376376 eventually(timeout(batchDuration * 5 )) {
377- assert(waiter .getNumCompletedBatches === i)
377+ assert(batchCounter .getNumCompletedBatches === i)
378378 }
379379 }
380380 }
381381 clock.addToTime(batchDuration.milliseconds)
382382 eventually(timeout(batchDuration * 5 )) {
383383 // Wait until all files have been recorded and all batches have started
384- assert(recordedFiles(ssc) === Seq (1 , 2 , 3 ) && waiter .getNumStartedBatches === 3 )
384+ assert(recordedFiles(ssc) === Seq (1 , 2 , 3 ) && batchCounter .getNumStartedBatches === 3 )
385385 }
386386 // Wait for a checkpoint to be written
387387 val fs = new Path (checkpointDir).getFileSystem(ssc.sc.hadoopConfiguration)
@@ -390,7 +390,7 @@ class CheckpointSuite extends TestSuiteBase {
390390 }
391391 ssc.stop()
392392 // Check that we shut down while the third batch was being processed
393- assert(waiter .getNumCompletedBatches === 2 )
393+ assert(batchCounter .getNumCompletedBatches === 2 )
394394 assert(outputStream.output.flatten === Seq (1 , 3 ))
395395 }
396396
@@ -413,7 +413,7 @@ class CheckpointSuite extends TestSuiteBase {
413413 newClock.setTime(clock.currentTime())
414414 newClock
415415 }
416- val waiter = new StreamingTestWaiter (ssc)
416+ val batchCounter = new BatchCounter (ssc)
417417 val outputStream = ssc.graph.getOutputStreams().head.asInstanceOf [TestOutputStream [Int ]]
418418 // Check that we remember files that were recorded before the restart
419419 assert(recordedFiles(ssc) === Seq (1 , 2 , 3 ))
@@ -425,7 +425,7 @@ class CheckpointSuite extends TestSuiteBase {
425425 writeFile(i, clock)
426426 clock.addToTime(batchDuration.milliseconds)
427427 eventually(timeout(batchDuration * 5 )) {
428- assert(waiter .getNumCompletedBatches === index + 1 )
428+ assert(batchCounter .getNumCompletedBatches === index + 1 )
429429 }
430430 }
431431 clock.addToTime(batchDuration.milliseconds)
0 commit comments