Class KafkaProducerTest

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

public class KafkaProducerTest extends Object
  • Constructor Details

    • KafkaProducerTest

      public KafkaProducerTest()
  • Method Details

    • setup

      @BeforeEach public void setup(org.junit.jupiter.api.TestInfo testInfo)
    • detectLeaks

      @AfterEach public void detectLeaks() throws InterruptedException
      Throws:
      InterruptedException
    • testOverwriteAcksAndRetriesForIdempotentProducers

      @Test public void testOverwriteAcksAndRetriesForIdempotentProducers()
    • testAcksAndIdempotenceForIdempotentProducers

      @Test public void testAcksAndIdempotenceForIdempotentProducers()
    • testRetriesAndIdempotenceForIdempotentProducers

      @Test public void testRetriesAndIdempotenceForIdempotentProducers()
    • testInflightRequestsAndIdempotenceForIdempotentProducers

      @Test public void testInflightRequestsAndIdempotenceForIdempotentProducers()
    • testMetricsReporterAutoGeneratedClientId

      @Test public void testMetricsReporterAutoGeneratedClientId()
    • testDisableJmxAndClientTelemetryReporter

      @Test public void testDisableJmxAndClientTelemetryReporter()
    • testExplicitlyOnlyEnableJmxReporter

      @Test public void testExplicitlyOnlyEnableJmxReporter()
    • testExplicitlyOnlyEnableClientTelemetryReporter

      @Test public void testExplicitlyOnlyEnableClientTelemetryReporter()
    • testConstructorWithSerializers

      @Test public void testConstructorWithSerializers()
    • testNoSerializerProvided

      @Test public void testNoSerializerProvided()
    • testConstructorFailureCloseResource

      @Test public void testConstructorFailureCloseResource()
    • testConstructorWithNotStringKey

      @Test public void testConstructorWithNotStringKey()
    • testConstructorWithInvalidMetricReporterClass

      @Test public void testConstructorWithInvalidMetricReporterClass()
    • testSerializerClose

      @Test public void testSerializerClose()
    • testInterceptorConstructClose

      @Test public void testInterceptorConstructClose()
    • testInterceptorConstructorConfigurationWithExceptionShouldCloseRemainingInstances

      @Test public void testInterceptorConstructorConfigurationWithExceptionShouldCloseRemainingInstances()
    • testPartitionerClose

      @Test public void testPartitionerClose()
    • shouldCloseProperlyAndThrowIfInterrupted

      @Test public void shouldCloseProperlyAndThrowIfInterrupted() throws Exception
      Throws:
      Exception
    • testOsDefaultSocketBufferSizes

      @Test public void testOsDefaultSocketBufferSizes()
    • testInvalidSocketSendBufferSize

      @Test public void testInvalidSocketSendBufferSize()
    • testInvalidSocketReceiveBufferSize

      @Test public void testInvalidSocketReceiveBufferSize()
    • testMetadataFetch

      @ParameterizedTest @ValueSource(booleans={true,false}) public void testMetadataFetch(boolean isIdempotenceEnabled) throws InterruptedException
      Throws:
      InterruptedException
    • testMetadataExpiry

      @ParameterizedTest @ValueSource(booleans={true,false}) public void testMetadataExpiry(boolean isIdempotenceEnabled) throws InterruptedException
      Throws:
      InterruptedException
    • testMetadataTimeoutWithMissingTopic

      @ParameterizedTest @ValueSource(booleans={true,false}) public void testMetadataTimeoutWithMissingTopic(boolean isIdempotenceEnabled) throws Exception
      Throws:
      Exception
    • testMetadataWithPartitionOutOfRange

      @ParameterizedTest @ValueSource(booleans={true,false}) public void testMetadataWithPartitionOutOfRange(boolean isIdempotenceEnabled) throws Exception
      Throws:
      Exception
    • testMetadataTimeoutWithPartitionOutOfRange

      @ParameterizedTest @ValueSource(booleans={true,false}) public void testMetadataTimeoutWithPartitionOutOfRange(boolean isIdempotenceEnabled) throws Exception
      Throws:
      Exception
    • testTopicRefreshInMetadata

      @Test public void testTopicRefreshInMetadata() throws InterruptedException
      Throws:
      InterruptedException
    • testTopicNotExistingInMetadata

      @Test public void testTopicNotExistingInMetadata()
    • testTopicExpiryInMetadata

      @Test public void testTopicExpiryInMetadata() throws InterruptedException
      Throws:
      InterruptedException
    • testHeadersSuccess

      @Test public void testHeadersSuccess()
    • testHeadersFailure

      @Test public void testHeadersFailure()
    • closeShouldBeIdempotent

      @Test public void closeShouldBeIdempotent()
    • closeWithNegativeTimestampShouldThrow

      @Test public void closeWithNegativeTimestampShouldThrow()
    • testFlushCompleteSendOfInflightBatches

      @Test public void testFlushCompleteSendOfInflightBatches()
    • testFlushMeasureLatency

      @Test public void testFlushMeasureLatency()
    • testMetricConfigRecordingLevel

      @Test public void testMetricConfigRecordingLevel()
    • testInterceptorPartitionSetOnTooLargeRecord

      @Test public void testInterceptorPartitionSetOnTooLargeRecord()
    • testPartitionsForWithNullTopic

      @Test public void testPartitionsForWithNullTopic()
    • testRequestTimeoutRetriable

      @Test public void testRequestTimeoutRetriable() throws Exception
      Throws:
      Exception
    • testInitTransactionsResponseAfterTimeout

      @Test public void testInitTransactionsResponseAfterTimeout() throws Exception
      Throws:
      Exception
    • testInitTransactionTimeout

      @Test public void testInitTransactionTimeout()
    • testInitTransactionWhileThrottled

      @Test public void testInitTransactionWhileThrottled()
    • testClusterAuthorizationFailure

      @Test public void testClusterAuthorizationFailure() throws Exception
      Throws:
      Exception
    • testAbortTransaction

      @Test public void testAbortTransaction()
    • testTransactionV2ProduceWithConcurrentTransactionError

      @Test public void testTransactionV2ProduceWithConcurrentTransactionError() throws Exception
      Throws:
      Exception
    • testMeasureAbortTransactionDuration

      @Test public void testMeasureAbortTransactionDuration()
    • testCommitTransactionWithRecordTooLargeException

      @Test public void testCommitTransactionWithRecordTooLargeException()
    • testCommitTransactionWithMetadataTimeoutForMissingTopic

      @Test public void testCommitTransactionWithMetadataTimeoutForMissingTopic()
    • testCommitTransactionWithMetadataTimeoutForPartitionOutOfRange

      @Test public void testCommitTransactionWithMetadataTimeoutForPartitionOutOfRange()
    • testCommitTransactionWithSendToInvalidTopic

      @Test public void testCommitTransactionWithSendToInvalidTopic()
    • testSendTxnOffsetsWithGroupId

      @Test public void testSendTxnOffsetsWithGroupId()
    • testSendTxnOffsetsWithGroupIdTransactionV2

      @Test public void testSendTxnOffsetsWithGroupIdTransactionV2()
    • testSendOffsetsToTransactionNegotiatesV6WhenMetadataKnowsTopicId

      @Test public void testSendOffsetsToTransactionNegotiatesV6WhenMetadataKnowsTopicId()
    • testSendOffsetsToTransactionTriggersMetadataRefreshThenNegotiatesV6

      @Test public void testSendOffsetsToTransactionTriggersMetadataRefreshThenNegotiatesV6()
    • testTransactionV2Produce

      @Test public void testTransactionV2Produce() throws Exception
      Throws:
      Exception
    • testMeasureTransactionDurations

      @Test public void testMeasureTransactionDurations()
    • testSendTxnOffsetsWithGroupMetadata

      @Test public void testSendTxnOffsetsWithGroupMetadata()
    • testNullGroupMetadataInSendOffsets

      @Test public void testNullGroupMetadataInSendOffsets()
    • testInvalidGenerationIdAndMemberIdCombinedInSendOffsets

      @Test public void testInvalidGenerationIdAndMemberIdCombinedInSendOffsets()
    • testClientInstanceId

      @Test public void testClientInstanceId()
    • testClientInstanceIdInvalidTimeout

      @Test public void testClientInstanceIdInvalidTimeout()
    • testClientInstanceIdNoTelemetryReporterRegistered

      @Test public void testClientInstanceIdNoTelemetryReporterRegistered()
    • testOnlyCanExecuteCloseAfterInitTransactionsTimeout

      @Test public void testOnlyCanExecuteCloseAfterInitTransactionsTimeout()
    • testSendToInvalidTopic

      @Test public void testSendToInvalidTopic()
    • testCloseWhenWaitingForMetadataUpdate

      @Test public void testCloseWhenWaitingForMetadataUpdate() throws InterruptedException
      Throws:
      InterruptedException
    • testTransactionalMethodThrowsWhenSenderClosed

      @Test public void testTransactionalMethodThrowsWhenSenderClosed()
    • testCloseIsForcedOnPendingFindCoordinator

      @Test public void testCloseIsForcedOnPendingFindCoordinator() throws InterruptedException
      Throws:
      InterruptedException
    • testCloseIsForcedOnPendingInitProducerId

      @Test public void testCloseIsForcedOnPendingInitProducerId() throws InterruptedException
      Throws:
      InterruptedException
    • testCloseIsForcedOnPendingAddOffsetRequest

      @Test public void testCloseIsForcedOnPendingAddOffsetRequest() throws InterruptedException
      Throws:
      InterruptedException
    • testProducerJmxPrefix

      @Test public void testProducerJmxPrefix() throws Exception
      Throws:
      Exception
    • configurableObjectsShouldSeeGeneratedClientId

      @Test public void configurableObjectsShouldSeeGeneratedClientId()
    • testUnusedConfigs

      @Test public void testUnusedConfigs()
    • testNullTopicName

      @Test public void testNullTopicName()
    • testCallbackAndInterceptorHandleError

      @Test public void testCallbackAndInterceptorHandleError()
    • shouldNotInvokeFlushInCallback

      @Test public void shouldNotInvokeFlushInCallback()
    • negativePartitionShouldThrow

      @Test public void negativePartitionShouldThrow()
    • testPartitionAddedToTransaction

      @Test public void testPartitionAddedToTransaction() throws Exception
      Throws:
      Exception
    • testSubscribingCustomMetricsDoesntAffectProducerMetrics

      @Test public void testSubscribingCustomMetricsDoesntAffectProducerMetrics()
    • testUnSubscribingNonExisingMetricsDoesntCauseError

      @Test public void testUnSubscribingNonExisingMetricsDoesntCauseError()
    • testSubscribingCustomMetricsWithSameNameDoesntAffectProducerMetrics

      @Test public void testSubscribingCustomMetricsWithSameNameDoesntAffectProducerMetrics()
    • testUnsubscribingCustomMetricWithSameNameAsExistingMetricDoesntAffectProducerMetric

      @Test public void testUnsubscribingCustomMetricWithSameNameAsExistingMetricDoesntAffectProducerMetric()
    • testShouldOnlyCallMetricReporterMetricChangeOnceWithExistingProducerMetric

      @Test public void testShouldOnlyCallMetricReporterMetricChangeOnceWithExistingProducerMetric()
    • testShouldNotCallMetricReporterMetricRemovalWithExistingProducerMetric

      @Test public void testShouldNotCallMetricReporterMetricRemovalWithExistingProducerMetric()
    • testProducerBootstrapResolutionExceptionPropagated

      @Test public void testProducerBootstrapResolutionExceptionPropagated()
    • testProducerSendOffsetsToTransactionBootstrapResolutionExceptionPropagated

      @Test public void testProducerSendOffsetsToTransactionBootstrapResolutionExceptionPropagated()
    • testProducerConstructorFailsWithConfigExceptionOnUnresolvableBootstrapWhenTimeoutZero

      @Test public void testProducerConstructorFailsWithConfigExceptionOnUnresolvableBootstrapWhenTimeoutZero()