Class ChunkedByteBufferOutputStreamTest
java.lang.Object
org.apache.kafka.clients.producer.internals.ChunkedByteBufferOutputStreamTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidteardown()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidThe fully-unused chunks are returned to the pool onChunkedByteBufferOutputStream.close()(the stream is closed for appends).voidvoid
-
Constructor Details
-
ChunkedByteBufferOutputStreamTest
public ChunkedByteBufferOutputStreamTest()
-
-
Method Details
-
teardown
@AfterEach public void teardown() -
testConstructorRejectsInvalidChunks
@Test public void testConstructorRejectsInvalidChunks() -
testOperationsRejectedAfterDeallocate
-
testWritesDisallowedAfterClose
-
testSingleChunkWriteRoundtrip
-
testWriteAcrossMultipleChunks
-
testRemainingSumsFreeBytesAcrossChunks
-
testEnsureRemainingDoesNotWasteCurrentChunk
-
testAddBuffersExtendsStream
-
testAddBuffersRejectsWrongSizeChunks
-
testPositionWalksAcrossChunks
-
testDeallocateReturnsAllChunks
-
testUnusedChunksReleasedOnCloseNotOnBuffer
The fully-unused chunks are returned to the pool onChunkedByteBufferOutputStream.close()(the stream is closed for appends). ReadingChunkedByteBufferOutputStream.buffer()afterwards has no chunk-releasing side effect; the data-bearing chunks stay reserved untilChunkedByteBufferOutputStream.deallocate(), which must not return the already-released chunks a second time.- Throws:
Exception
-