Skip to content

Commit e3194bd

Browse files
committed
Fix unit test failure
1 parent 58fbc00 commit e3194bd

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

core/src/main/scala/org/apache/spark/storage/BlockManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ private[spark] class BlockManager(
803803
val putBlockStatus = getCurrentBlockStatus(blockId, info)
804804
val blockWasSuccessfullyStored = putBlockStatus.storageLevel.isValid
805805
if (blockWasSuccessfullyStored) {
806-
// Now that the block is in either the memory, externalBlockStore, or disk store,
806+
// Now that the block is in either the memory or disk store,
807807
// tell the master about it.
808808
info.size = size
809809
if (tellMaster) {

core/src/test/scala/org/apache/spark/memory/TestMemoryManager.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class TestMemoryManager(conf: SparkConf)
5656
}
5757
override def maxOnHeapStorageMemory: Long = Long.MaxValue
5858

59+
override def maxOffHeapStorageMemory: Long = 0L
60+
5961
private var oomOnce = false
6062
private var available = Long.MaxValue
6163

core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ class BlockManagerSuite extends SparkFunSuite with Matchers with BeforeAndAfterE
239239

240240
// Checking whether blocks are in memory and memory size
241241
val memStatus = master.getMemoryStatus.head._2
242-
assert(memStatus._1 == 20000L, "total memory " + memStatus._1 + " should equal 20000")
243-
assert(memStatus._2 <= 12000L, "remaining memory " + memStatus._2 + " should <= 12000")
242+
assert(memStatus._1 == 40000L, "total memory " + memStatus._1 + " should equal 40000")
243+
assert(memStatus._2 <= 32000L, "remaining memory " + memStatus._2 + " should <= 12000")
244244
assert(store.getSingleAndReleaseLock("a1-to-remove").isDefined, "a1 was not in store")
245245
assert(store.getSingleAndReleaseLock("a2-to-remove").isDefined, "a2 was not in store")
246246
assert(store.getSingleAndReleaseLock("a3-to-remove").isDefined, "a3 was not in store")
@@ -269,8 +269,8 @@ class BlockManagerSuite extends SparkFunSuite with Matchers with BeforeAndAfterE
269269
}
270270
eventually(timeout(1000 milliseconds), interval(10 milliseconds)) {
271271
val memStatus = master.getMemoryStatus.head._2
272-
memStatus._1 should equal (20000L)
273-
memStatus._2 should equal (20000L)
272+
memStatus._1 should equal (40000L)
273+
memStatus._2 should equal (40000L)
274274
}
275275
}
276276

0 commit comments

Comments
 (0)