Class ProducerBatchTest

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

public class ProducerBatchTest extends Object
  • Constructor Details

    • ProducerBatchTest

      public ProducerBatchTest()
  • Method Details

    • testBatchAbort

      @Test public void testBatchAbort() throws Exception
      Throws:
      Exception
    • testBatchCannotAbortTwice

      @Test public void testBatchCannotAbortTwice() throws Exception
      Throws:
      Exception
    • testBatchCannotCompleteTwice

      @Test public void testBatchCannotCompleteTwice() throws Exception
      Throws:
      Exception
    • testSplitPreservesHeaders

      @Test public void testSplitPreservesHeaders()
    • testSplitPreservesMagicAndCompressionType

      @Test public void testSplitPreservesMagicAndCompressionType()
    • testBatchExpiration

      @Test public void testBatchExpiration()
      A ProducerBatch configured using a timestamp preceding its create time is interpreted correctly as not expired by ProducerBatch.hasReachedDeliveryTimeout(long, long).
    • testBatchExpirationAfterReenqueue

      @Test public void testBatchExpirationAfterReenqueue()
      A ProducerBatch configured using a timestamp preceding its create time is interpreted correctly * as not expired by ProducerBatch.hasReachedDeliveryTimeout(long, long).
    • testShouldNotAttemptAppendOnceRecordsBuilderIsClosedForAppends

      @Test public void testShouldNotAttemptAppendOnceRecordsBuilderIsClosedForAppends()
    • testCompleteExceptionallyWithRecordErrors

      @Test public void testCompleteExceptionallyWithRecordErrors()
    • testCompleteExceptionallyWithNullRecordErrors

      @Test public void testCompleteExceptionallyWithNullRecordErrors()
    • testWithLeaderChangesAcrossRetries

      @Test public void testWithLeaderChangesAcrossRetries()
      This tests that leader is correctly maintained invalid input: '&' leader-change is correctly detected across retries of the batch. It does so by testing primarily testing methods 1. maybeUpdateLeaderEpoch 2. hasLeaderChangedForTheOngoingRetry