Class KafkaProducerTest
java.lang.Object
org.apache.kafka.clients.producer.KafkaProducerTest
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidsetup(org.junit.jupiter.api.TestInfo testInfo) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidtestMetadataExpiry(boolean isIdempotenceEnabled) voidtestMetadataFetch(boolean isIdempotenceEnabled) voidtestMetadataTimeoutWithMissingTopic(boolean isIdempotenceEnabled) voidtestMetadataTimeoutWithPartitionOutOfRange(boolean isIdempotenceEnabled) voidtestMetadataWithPartitionOutOfRange(boolean isIdempotenceEnabled) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Constructor Details
-
KafkaProducerTest
public KafkaProducerTest()
-
-
Method Details
-
setup
@BeforeEach public void setup(org.junit.jupiter.api.TestInfo testInfo) -
detectLeaks
- 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
-
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
-
testMetadataWithPartitionOutOfRange
-
testMetadataTimeoutWithPartitionOutOfRange
-
testTopicRefreshInMetadata
- Throws:
InterruptedException
-
testTopicNotExistingInMetadata
@Test public void testTopicNotExistingInMetadata() -
testTopicExpiryInMetadata
- 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
-
testInitTransactionsResponseAfterTimeout
-
testInitTransactionTimeout
@Test public void testInitTransactionTimeout() -
testInitTransactionWhileThrottled
@Test public void testInitTransactionWhileThrottled() -
testClusterAuthorizationFailure
-
testAbortTransaction
@Test public void testAbortTransaction() -
testTransactionV2ProduceWithConcurrentTransactionError
-
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
-
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
- Throws:
InterruptedException
-
testTransactionalMethodThrowsWhenSenderClosed
@Test public void testTransactionalMethodThrowsWhenSenderClosed() -
testCloseIsForcedOnPendingFindCoordinator
- Throws:
InterruptedException
-
testCloseIsForcedOnPendingInitProducerId
- Throws:
InterruptedException
-
testCloseIsForcedOnPendingAddOffsetRequest
- Throws:
InterruptedException
-
testProducerJmxPrefix
-
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
-
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()
-