Skip to content

Commit 0a347fd

Browse files
committed
Fix test compilation in streaming.
1 parent de62f0d commit 0a347fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

streaming/src/test/scala/org/apache/spark/streaming/ReceivedBlockHandlerSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class ReceivedBlockHandlerSuite
338338

339339
storeAndVerify(blocks.map { b => IteratorBlock(b.toIterator) })
340340
storeAndVerify(blocks.map { b => ArrayBufferBlock(new ArrayBuffer ++= b) })
341-
storeAndVerify(blocks.map { b => ByteBufferBlock(dataToByteBuffer(b)) })
341+
storeAndVerify(blocks.map { b => ByteBufferBlock(dataToByteBuffer(b).toByteBuffer) })
342342
}
343343

344344
/** Test error handling when blocks that cannot be stored */

streaming/src/test/scala/org/apache/spark/streaming/rdd/WriteAheadLogBackedBlockRDDSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class WriteAheadLogBackedBlockRDDSuite
223223
require(blockData.size === blockIds.size)
224224
val writer = new FileBasedWriteAheadLogWriter(new File(dir, "logFile").toString, hadoopConf)
225225
val segments = blockData.zip(blockIds).map { case (data, id) =>
226-
writer.write(blockManager.dataSerialize(id, data.iterator))
226+
writer.write(blockManager.dataSerialize(id, data.iterator).toByteBuffer)
227227
}
228228
writer.close()
229229
segments

0 commit comments

Comments
 (0)