Class FetchBufferTest
java.lang.Object
org.apache.kafka.clients.consumer.internals.FetchBufferTest
This tests the
FetchBuffer functionality in addition to what FetcherTest covers in its tests.
One of the main concerns of these tests are that we correctly handle both places that data is held internally:
- A special "next in line" buffer
- The remainder of the buffers in a queue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetup()voidTests that the buffer manipulates partitions for both the queue and the next-in-line buffer.voidVerifies the basics: we can add buffered data to the queue, peek to view them, and poll to remove them.voidTests that the buffer returns partitions for both the queue and the next-in-line buffer.voidVerifiesFetchBuffer.close()} closes the buffered data for both the queue and the next-in-line buffer.void
-
Constructor Details
-
FetchBufferTest
public FetchBufferTest()
-
-
Method Details
-
setup
@BeforeEach public void setup() -
testBasicPeekAndPoll
@Test public void testBasicPeekAndPoll()Verifies the basics: we can add buffered data to the queue, peek to view them, and poll to remove them. -
testCloseClearsData
@Test public void testCloseClearsData()VerifiesFetchBuffer.close()} closes the buffered data for both the queue and the next-in-line buffer. -
testBufferedPartitions
@Test public void testBufferedPartitions()Tests that the buffer returns partitions for both the queue and the next-in-line buffer. -
testAddAllAndRetainAll
@Test public void testAddAllAndRetainAll()Tests that the buffer manipulates partitions for both the queue and the next-in-line buffer. -
testWakeup
-