Class RecordAccumulatorTest
java.lang.Object
org.apache.kafka.clients.producer.internals.RecordAccumulatorTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidteardown()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidtestFull()voidvoidvoidvoidvoidvoidvoidFor a batch being retried, this validates ready() and drain() whether a batch should skip-backoff(retries-immediately), or backoff, based on - 1.voidvoidvoidvoidvoidThis test verifies that RecordAccumulator's batch splitting functionality correctly handles oversized batches by splitting them down to individual records when necessary.voidvoidvoidvoid
-
Constructor Details
-
RecordAccumulatorTest
public RecordAccumulatorTest()
-
-
Method Details
-
teardown
@AfterEach public void teardown() -
testDrainBatches
-
testFull
-
testAppendLargeCompressed
-
testAppendLargeNonCompressed
-
testAppendLargeOldMessageFormatCompressed
-
testAppendLargeOldMessageFormatNonCompressed
-
testLinger
-
testPartialDrain
-
testStressfulSituation
-
testNextReadyCheckDelay
-
testRetryBackoff
-
testExponentialRetryBackoff
-
testExponentialRetryBackoffLeaderChange
-
testFlush
-
testAwaitFlushComplete
-
testAbortIncompleteBatches
-
testAbortUnsentBatches
-
testExpiredBatchSingle
- Throws:
InterruptedException
-
testExpiredBatchSingleMaxValue
- Throws:
InterruptedException
-
testExpiredBatches
- Throws:
InterruptedException
-
testMutedPartitions
- Throws:
InterruptedException
-
testRecordsDrainedWhenTransactionCompleting
-
testSplitAndReenqueue
-
testHasRoomForAllowsOversizedFirstRecordButRejectsSubsequentRecords
@Test public void testHasRoomForAllowsOversizedFirstRecordButRejectsSubsequentRecords() -
testSplitBatchOffAccumulator
- Throws:
InterruptedException
-
testSplitFrequency
- Throws:
InterruptedException
-
testSoonToExpireBatchesArePickedUpForExpiry
- Throws:
InterruptedException
-
testExpiredBatchesRetry
- Throws:
InterruptedException
-
testUniformBuiltInPartitioner
-
testAdaptiveBuiltInPartitioner
-
testBuiltInPartitionerFractionalBatches
-
testReadyAndDrainWhenABatchIsBeingRetried
For a batch being retried, this validates ready() and drain() whether a batch should skip-backoff(retries-immediately), or backoff, based on - 1. how long it has waited between retry attempts. 2. change in leader hosting the partition.- Throws:
InterruptedException
-
testDrainWithANodeThatDoesntHostAnyPartitions
@Test public void testDrainWithANodeThatDoesntHostAnyPartitions() -
testSplitAndReenqueuePreventInfiniteRecursion
This test verifies that RecordAccumulator's batch splitting functionality correctly handles oversized batches by splitting them down to individual records when necessary. It ensures that: 1. The splitting process can reduce batches to single-record size 2. The process does not enter infinite recursion loops 3. No records are lost or duplicated during splitting 4. The correct batch state is maintained throughout the process- Throws:
InterruptedException
-
testProduceRequestResultAwaitAllDependents
-