Skip to content

Commit 3fade95

Browse files
committed
fix test
1 parent 2453b8b commit 3fade95

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ class AsyncRDDActionsSuite extends SparkFunSuite with BeforeAndAfterAll with Tim
199199
val f = sc.parallelize(1 to 100, 4)
200200
.mapPartitions(itr => { Thread.sleep(20); itr })
201201
.countAsync()
202-
val e = intercept[SparkException] {
202+
intercept[TimeoutException] {
203203
ThreadUtils.awaitResult(f, Duration(20, "milliseconds"))
204204
}
205-
assert(e.getCause.isInstanceOf[TimeoutException])
206205
}
207206

208207
private def testAsyncAction[R](action: RDD[Int] => FutureAction[R]): Unit = {

0 commit comments

Comments
 (0)