Skip to content
Snippets Groups Projects
Commit 2274ad07 authored by Shivaram Venkataraman's avatar Shivaram Venkataraman
Browse files

Fix flaky test by changing catch and adding sleep

parent 6fe9d4e6
No related branches found
No related tags found
No related merge requests found
......@@ -261,9 +261,9 @@ class DistributedSuite extends FunSuite with ShouldMatchers with BeforeAndAfter
val data = sc.parallelize(Seq(true, false, false, false), 4)
data.persist(StorageLevel.MEMORY_ONLY_2)
data.count
assert(sc.persistentRdds.isEmpty == false)
assert(sc.persistentRdds.isEmpty === false)
data.unpersist()
assert(sc.persistentRdds.isEmpty == true)
assert(sc.persistentRdds.isEmpty === true)
failAfter(Span(3000, Millis)) {
try {
......@@ -271,12 +271,12 @@ class DistributedSuite extends FunSuite with ShouldMatchers with BeforeAndAfter
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)
}
}
......
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