aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2012-07-27 16:59:36 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2012-07-27 16:59:36 -0700
commitf6f917bd00a1cae5e99f7888e46e3f232959f280 (patch)
treea076a91169a64334a155ea39101380d4173877ae
parentc0c78d21194d880b4a723c7083c6c45bec966c33 (diff)
downloadspark-f6f917bd00a1cae5e99f7888e46e3f232959f280.tar.gz
spark-f6f917bd00a1cae5e99f7888e46e3f232959f280.tar.bz2
spark-f6f917bd00a1cae5e99f7888e46e3f232959f280.zip
Add a sleep to prevent a failing test.
The BlockManager's put seems to be slightly asynchronous, which can cause it to fail this test by not removing stuff from the cache before we put the next value. We should probably change the semantics of put() in this case but it's hard right now. It will also be hard for asynchronously replicated puts.
-rw-r--r--core/src/test/scala/spark/storage/BlockManagerSuite.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/test/scala/spark/storage/BlockManagerSuite.scala b/core/src/test/scala/spark/storage/BlockManagerSuite.scala
index 15f4b9c6b3..1ed5519d37 100644
--- a/core/src/test/scala/spark/storage/BlockManagerSuite.scala
+++ b/core/src/test/scala/spark/storage/BlockManagerSuite.scala
@@ -215,6 +215,7 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfterEach {
assert(store.get("list3").get.size === 2)
// Now let's add in list4, which uses both disk and memory; list1 should drop out
store.put("list4", list4.iterator, StorageLevel.DISK_AND_MEMORY)
+ Thread.sleep(100)
assert(store.get("list1") === None, "list1 was in store")
assert(store.get("list2") != None, "list3 was not in store")
assert(store.get("list2").get.size === 2)