Skip to content
Snippets Groups Projects
Commit f6ad3781 authored by Reynold Xin's avatar Reynold Xin
Browse files

Fixed the flaky unpersist test in RDDSuite.

parent bed1b081
No related branches found
No related tags found
No related merge requests found
......@@ -106,9 +106,9 @@ class RDDSuite extends FunSuite with LocalSparkContext {
sc = new SparkContext("local", "test")
val rdd = sc.makeRDD(Array(1, 2, 3, 4), 2).cache()
rdd.count
assert(sc.persistentRdds.isEmpty == false)
assert(sc.persistentRdds.isEmpty === false)
rdd.unpersist()
assert(sc.persistentRdds.isEmpty == true)
assert(sc.persistentRdds.isEmpty === true)
failAfter(Span(3000, Millis)) {
try {
......@@ -116,12 +116,12 @@ class RDDSuite extends FunSuite with LocalSparkContext {
Thread.sleep(200)
}
} catch {
case e: Exception =>
case _ => { Thread.sleep(10) }
// Do nothing. We might see exceptions because block manager
// is racing this thread to remove entries from the driver.
}
}
assert(sc.getRDDStorageInfo.isEmpty == true)
assert(sc.getRDDStorageInfo.isEmpty === true)
}
test("caching with failures") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment