Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package org.apache.spark.sql.util

import java.util.concurrent.ConcurrentLinkedQueue

import scala.util.control.NonFatal

import org.scalatest.BeforeAndAfter
import org.scalatest.PrivateMethodTester._
import org.scalatest.concurrent.AsyncAssertions.Waiter
Expand Down Expand Up @@ -164,8 +162,8 @@ class ContinuousQueryListenerSuite extends StreamTest with SharedSQLContext with
}

class QueryStatusCollector extends ContinuousQueryListener {

private val asyncTestWaiter = new Waiter // to catch errors in the async listener events
// to catch errors in the async listener events
@volatile private var asyncTestWaiter = new Waiter

@volatile var startStatus: QueryStatus = null
@volatile var terminationStatus: QueryStatus = null
Expand All @@ -175,11 +173,7 @@ class ContinuousQueryListenerSuite extends StreamTest with SharedSQLContext with
startStatus = null
terminationStatus = null
progressStatuses.clear()

// To reset the waiter
try asyncTestWaiter.await(timeout(1 milliseconds)) catch {
case NonFatal(e) =>
}
asyncTestWaiter = new Waiter
}

def checkAsyncErrors(): Unit = {
Expand Down