From f6f917bd00a1cae5e99f7888e46e3f232959f280 Mon Sep 17 00:00:00 2001 From: Matei Zaharia Date: Fri, 27 Jul 2012 16:59:36 -0700 Subject: 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. --- core/src/test/scala/spark/storage/BlockManagerSuite.scala | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.3