Github user massie commented on a diff in the pull request:
https://github.com/apache/spark/pull/6423#discussion_r32177783
--- Diff:
core/src/test/scala/org/apache/spark/storage/ShuffleBlockFetcherIteratorSuite.scala
---
@@ -104,10 +113,13 @@ class ShuffleBlockFetcherIteratorSuite extends
SparkFunSuite {
assert(subIterator.isSuccess,
s"iterator should have 5 elements defined but actually has $i
elements")
- // Make sure we release the buffer once the iterator is exhausted.
+ // Make sure we release buffers when a wrapped input stream is
closed.
val mockBuf = localBlocks.getOrElse(blockId, remoteBlocks(blockId))
+ val wrappedInputStream = new
BufferReleasingInputStream(mock(classOf[InputStream]), iterator)
--- End diff --
Renamed `subIterator` to `inputStream`. Updated `localBlocks` and
`remoteBlocks` to use `createMockManagedBuffer()` so that `inputStream.get`
isn't null and using it doesn't cause an NPE.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]