Class RecordAccumulatorTest

java.lang.Object
org.apache.kafka.clients.producer.internals.RecordAccumulatorTest

public class RecordAccumulatorTest extends Object
  • Constructor Details

    • RecordAccumulatorTest

      public RecordAccumulatorTest()
  • Method Details

    • teardown

      @AfterEach public void teardown()
    • testDrainBatches

      @Test public void testDrainBatches() throws Exception
      Throws:
      Exception
    • testFull

      @Test public void testFull() throws Exception
      Throws:
      Exception
    • testAppendLargeCompressed

      @Test public void testAppendLargeCompressed() throws Exception
      Throws:
      Exception
    • testAppendLargeNonCompressed

      @Test public void testAppendLargeNonCompressed() throws Exception
      Throws:
      Exception
    • testAppendLargeOldMessageFormatCompressed

      @Test public void testAppendLargeOldMessageFormatCompressed() throws Exception
      Throws:
      Exception
    • testAppendLargeOldMessageFormatNonCompressed

      @Test public void testAppendLargeOldMessageFormatNonCompressed() throws Exception
      Throws:
      Exception
    • testLinger

      @Test public void testLinger() throws Exception
      Throws:
      Exception
    • testPartialDrain

      @Test public void testPartialDrain() throws Exception
      Throws:
      Exception
    • testStressfulSituation

      @Test public void testStressfulSituation() throws Exception
      Throws:
      Exception
    • testNextReadyCheckDelay

      @Test public void testNextReadyCheckDelay() throws Exception
      Throws:
      Exception
    • testRetryBackoff

      @Test public void testRetryBackoff() throws Exception
      Throws:
      Exception
    • testExponentialRetryBackoff

      @Test public void testExponentialRetryBackoff() throws Exception
      Throws:
      Exception
    • testExponentialRetryBackoffLeaderChange

      @Test public void testExponentialRetryBackoffLeaderChange() throws Exception
      Throws:
      Exception
    • testFlush

      @Test public void testFlush() throws Exception
      Throws:
      Exception
    • testAwaitFlushComplete

      @Test public void testAwaitFlushComplete() throws Exception
      Throws:
      Exception
    • testAbortIncompleteBatches

      @Test public void testAbortIncompleteBatches() throws Exception
      Throws:
      Exception
    • testAbortUnsentBatches

      @Test public void testAbortUnsentBatches() throws Exception
      Throws:
      Exception
    • testExpiredBatchSingle

      @Test public void testExpiredBatchSingle() throws InterruptedException
      Throws:
      InterruptedException
    • testExpiredBatchSingleMaxValue

      @Test public void testExpiredBatchSingleMaxValue() throws InterruptedException
      Throws:
      InterruptedException
    • testExpiredBatches

      @Test public void testExpiredBatches() throws InterruptedException
      Throws:
      InterruptedException
    • testMutedPartitions

      @Test public void testMutedPartitions() throws InterruptedException
      Throws:
      InterruptedException
    • testRecordsDrainedWhenTransactionCompleting

      @Test public void testRecordsDrainedWhenTransactionCompleting() throws Exception
      Throws:
      Exception
    • testSplitAndReenqueue

      @Test public void testSplitAndReenqueue() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testHasRoomForAllowsOversizedFirstRecordButRejectsSubsequentRecords

      @Test public void testHasRoomForAllowsOversizedFirstRecordButRejectsSubsequentRecords()
    • testSplitBatchOffAccumulator

      @Test public void testSplitBatchOffAccumulator() throws InterruptedException
      Throws:
      InterruptedException
    • testSplitFrequency

      @Test public void testSplitFrequency() throws InterruptedException
      Throws:
      InterruptedException
    • testSoonToExpireBatchesArePickedUpForExpiry

      @Test public void testSoonToExpireBatchesArePickedUpForExpiry() throws InterruptedException
      Throws:
      InterruptedException
    • testExpiredBatchesRetry

      @Test public void testExpiredBatchesRetry() throws InterruptedException
      Throws:
      InterruptedException
    • testUniformBuiltInPartitioner

      @Test public void testUniformBuiltInPartitioner() throws Exception
      Throws:
      Exception
    • testAdaptiveBuiltInPartitioner

      @Test public void testAdaptiveBuiltInPartitioner() throws Exception
      Throws:
      Exception
    • testBuiltInPartitionerFractionalBatches

      @Test public void testBuiltInPartitionerFractionalBatches() throws Exception
      Throws:
      Exception
    • testReadyAndDrainWhenABatchIsBeingRetried

      @Test public void testReadyAndDrainWhenABatchIsBeingRetried() throws InterruptedException
      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

      @Test public void testSplitAndReenqueuePreventInfiniteRecursion() throws InterruptedException
      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

      @Test public void testProduceRequestResultAwaitAllDependents() throws Exception
      Throws:
      Exception