Class MockProducerTest

java.lang.Object
org.apache.kafka.clients.producer.MockProducerTest

public class MockProducerTest extends Object
  • Constructor Details

    • MockProducerTest

      public MockProducerTest()
  • Method Details

    • cleanup

      @AfterEach public void cleanup()
    • testAutoCompleteMock

      @Test public void testAutoCompleteMock() throws Exception
      Throws:
      Exception
    • testPartitioner

      @Test public void testPartitioner() throws Exception
      Throws:
      Exception
    • testManualCompletion

      @Test public void testManualCompletion() throws Exception
      Throws:
      Exception
    • shouldInitTransactions

      @Test public void shouldInitTransactions()
    • shouldThrowOnInitTransactionIfProducerAlreadyInitializedForTransactions

      @Test public void shouldThrowOnInitTransactionIfProducerAlreadyInitializedForTransactions()
    • shouldThrowOnBeginTransactionIfTransactionsNotInitialized

      @Test public void shouldThrowOnBeginTransactionIfTransactionsNotInitialized()
    • shouldBeginTransactions

      @Test public void shouldBeginTransactions()
    • shouldThrowOnBeginTransactionsIfTransactionInflight

      @Test public void shouldThrowOnBeginTransactionsIfTransactionInflight()
    • shouldThrowOnSendOffsetsToTransactionIfTransactionsNotInitialized

      @Test public void shouldThrowOnSendOffsetsToTransactionIfTransactionsNotInitialized()
    • shouldThrowOnSendOffsetsToTransactionTransactionIfNoTransactionGotStarted

      @Test public void shouldThrowOnSendOffsetsToTransactionTransactionIfNoTransactionGotStarted()
    • shouldThrowOnCommitIfTransactionsNotInitialized

      @Test public void shouldThrowOnCommitIfTransactionsNotInitialized()
    • shouldThrowOnCommitTransactionIfNoTransactionGotStarted

      @Test public void shouldThrowOnCommitTransactionIfNoTransactionGotStarted()
    • shouldCommitEmptyTransaction

      @Test public void shouldCommitEmptyTransaction()
    • shouldCountCommittedTransaction

      @Test public void shouldCountCommittedTransaction()
    • shouldNotCountAbortedTransaction

      @Test public void shouldNotCountAbortedTransaction()
    • shouldThrowOnAbortIfTransactionsNotInitialized

      @Test public void shouldThrowOnAbortIfTransactionsNotInitialized()
    • shouldThrowOnAbortTransactionIfNoTransactionGotStarted

      @Test public void shouldThrowOnAbortTransactionIfNoTransactionGotStarted()
    • shouldAbortEmptyTransaction

      @Test public void shouldAbortEmptyTransaction()
    • shouldThrowFenceProducerIfTransactionsNotInitialized

      @Test public void shouldThrowFenceProducerIfTransactionsNotInitialized()
    • shouldThrowOnBeginTransactionsIfProducerGotFenced

      @Test public void shouldThrowOnBeginTransactionsIfProducerGotFenced()
    • shouldThrowOnSendIfProducerGotFenced

      @Test public void shouldThrowOnSendIfProducerGotFenced()
    • shouldThrowOnSendOffsetsToTransactionByGroupIdIfProducerGotFenced

      @Test public void shouldThrowOnSendOffsetsToTransactionByGroupIdIfProducerGotFenced()
    • shouldThrowOnSendOffsetsToTransactionByGroupMetadataIfProducerGotFenced

      @Test public void shouldThrowOnSendOffsetsToTransactionByGroupMetadataIfProducerGotFenced()
    • shouldThrowOnCommitTransactionIfProducerGotFenced

      @Test public void shouldThrowOnCommitTransactionIfProducerGotFenced()
    • shouldThrowOnAbortTransactionIfProducerGotFenced

      @Test public void shouldThrowOnAbortTransactionIfProducerGotFenced()
    • shouldPublishMessagesOnlyAfterCommitIfTransactionsAreEnabled

      @Test public void shouldPublishMessagesOnlyAfterCommitIfTransactionsAreEnabled()
    • shouldFlushOnCommitForNonAutoCompleteIfTransactionsAreEnabled

      @Test public void shouldFlushOnCommitForNonAutoCompleteIfTransactionsAreEnabled()
    • shouldDropMessagesOnAbortIfTransactionsAreEnabled

      @Test public void shouldDropMessagesOnAbortIfTransactionsAreEnabled()
    • shouldThrowOnAbortForNonAutoCompleteIfTransactionsAreEnabled

      @Test public void shouldThrowOnAbortForNonAutoCompleteIfTransactionsAreEnabled()
    • shouldPreserveCommittedMessagesOnAbortIfTransactionsAreEnabled

      @Test public void shouldPreserveCommittedMessagesOnAbortIfTransactionsAreEnabled()
    • shouldPublishConsumerGroupOffsetsOnlyAfterCommitIfTransactionsAreEnabled

      @Test public void shouldPublishConsumerGroupOffsetsOnlyAfterCommitIfTransactionsAreEnabled()
    • shouldThrowOnNullConsumerGroupMetadataWhenSendOffsetsToTransaction

      @Test public void shouldThrowOnNullConsumerGroupMetadataWhenSendOffsetsToTransaction()
    • shouldIgnoreEmptyOffsetsWhenSendOffsetsToTransactionByGroupMetadata

      @Test public void shouldIgnoreEmptyOffsetsWhenSendOffsetsToTransactionByGroupMetadata()
    • shouldAddOffsetsWhenSendOffsetsToTransactionByGroupMetadata

      @Test public void shouldAddOffsetsWhenSendOffsetsToTransactionByGroupMetadata()
    • shouldResetSentOffsetsFlagOnlyWhenBeginningNewTransaction

      @Test public void shouldResetSentOffsetsFlagOnlyWhenBeginningNewTransaction()
    • shouldPublishLatestAndCumulativeConsumerGroupOffsetsOnlyAfterCommitIfTransactionsAreEnabled

      @Test public void shouldPublishLatestAndCumulativeConsumerGroupOffsetsOnlyAfterCommitIfTransactionsAreEnabled()
    • shouldDropConsumerGroupOffsetsOnAbortIfTransactionsAreEnabled

      @Test public void shouldDropConsumerGroupOffsetsOnAbortIfTransactionsAreEnabled()
    • shouldPreserveOffsetsFromCommitByGroupIdOnAbortIfTransactionsAreEnabled

      @Test public void shouldPreserveOffsetsFromCommitByGroupIdOnAbortIfTransactionsAreEnabled()
    • shouldPreserveOffsetsFromCommitByGroupMetadataOnAbortIfTransactionsAreEnabled

      @Test public void shouldPreserveOffsetsFromCommitByGroupMetadataOnAbortIfTransactionsAreEnabled()
    • shouldThrowOnInitTransactionIfProducerIsClosed

      @Test public void shouldThrowOnInitTransactionIfProducerIsClosed()
    • shouldThrowOnSendIfProducerIsClosed

      @Test public void shouldThrowOnSendIfProducerIsClosed()
    • shouldThrowOnBeginTransactionIfProducerIsClosed

      @Test public void shouldThrowOnBeginTransactionIfProducerIsClosed()
    • shouldThrowSendOffsetsToTransactionByGroupIdIfProducerIsClosed

      @Test public void shouldThrowSendOffsetsToTransactionByGroupIdIfProducerIsClosed()
    • shouldThrowSendOffsetsToTransactionByGroupMetadataIfProducerIsClosed

      @Test public void shouldThrowSendOffsetsToTransactionByGroupMetadataIfProducerIsClosed()
    • shouldThrowOnCommitTransactionIfProducerIsClosed

      @Test public void shouldThrowOnCommitTransactionIfProducerIsClosed()
    • shouldThrowOnAbortTransactionIfProducerIsClosed

      @Test public void shouldThrowOnAbortTransactionIfProducerIsClosed()
    • shouldThrowOnFenceProducerIfProducerIsClosed

      @Test public void shouldThrowOnFenceProducerIfProducerIsClosed()
    • shouldThrowOnFlushProducerIfProducerIsClosed

      @Test public void shouldThrowOnFlushProducerIfProducerIsClosed()
    • shouldNotThrowOnFlushProducerIfProducerIsFenced

      @Test public void shouldNotThrowOnFlushProducerIfProducerIsFenced()
    • shouldThrowClassCastException

      @Test public void shouldThrowClassCastException()
    • shouldBeFlushedIfNoBufferedRecords

      @Test public void shouldBeFlushedIfNoBufferedRecords()
    • shouldBeFlushedWithAutoCompleteIfBufferedRecords

      @Test public void shouldBeFlushedWithAutoCompleteIfBufferedRecords()
    • shouldNotBeFlushedWithNoAutoCompleteIfBufferedRecords

      @Test public void shouldNotBeFlushedWithNoAutoCompleteIfBufferedRecords()
    • shouldNotBeFlushedAfterFlush

      @Test public void shouldNotBeFlushedAfterFlush()
    • testMetadataOnException

      @Test public void testMetadataOnException() throws InterruptedException
      Throws:
      InterruptedException