Class KafkaAdminClientTest
java.lang.Object
org.apache.kafka.clients.admin.KafkaAdminClientTestBase
org.apache.kafka.clients.admin.KafkaAdminClientTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidtearDown()voidvoidvoidvoidvoidvoidtestAddRaftVoterRequest(boolean fail, boolean sendClusterId) voidvoidvoidvoidvoidtestAlterBrokerHealth(org.apache.kafka.clients.admin.BrokerComponent component) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidTest that if the client can send to a node, but doesn't receive a response, it will disconnect and try a different node.voidTest that if the client can obtain a node assignment, but can't send to the given node, it will disconnect and try a different node.voidvoidTest if admin client can be closed in the callback invoked when an api call completes.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidUpon receiving a NOT_CONTROLLER error, the admin client should update its metadata and retry the callvoidvoidvoidvoidtestDescribeBrokerHealth(org.apache.kafka.clients.admin.BrokerComponent component) voidvoidvoidvoidvoidvoidUpon receiving a NOT_CONTROLLER error, the admin client should update its metadata and retry the callvoidvoidvoidTest a scenario where the AdminClient cannot find the controller for longer than the request timeout.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidTest that OutOfMemoryError is properly propagated and not masked as TimeoutException.voidvoidvoidtestParseSuccessfulDescribeClusterResponse(boolean includeController) voidvoidTest that we propagate exceptions encountered when fetching metadata.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidtestRemoveRaftVoterRequest(boolean fail, boolean sendClusterId) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidTest that the client properly times out when we don't receive any metadata.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidtestUpdateFeaturesDuringSuccess(short version) voidtestUpdateFeaturesHandleNotControllerException(short version) voidvoidvoidvoidvoidvoidvoid
-
Constructor Details
-
KafkaAdminClientTest
public KafkaAdminClientTest()
-
-
Method Details
-
testDefaultApiTimeoutAndRequestTimeoutConflicts
@Test public void testDefaultApiTimeoutAndRequestTimeoutConflicts() -
testParseDescribeClusterResponseWithError
@Test public void testParseDescribeClusterResponseWithError() -
testParseDescribeClusterResponseWithUnexpectedEndpointType
@Test public void testParseDescribeClusterResponseWithUnexpectedEndpointType() -
testParseSuccessfulDescribeClusterResponse
@ParameterizedTest @ValueSource(booleans={false,true}) public void testParseSuccessfulDescribeClusterResponse(boolean includeController) -
testGetOrCreateListValue
@Test public void testGetOrCreateListValue() -
testCalcTimeoutMsRemainingAsInt
@Test public void testCalcTimeoutMsRemainingAsInt() -
testPrettyPrintException
@Test public void testPrettyPrintException() -
testGenerateClientId
@Test public void testGenerateClientId() -
testMetricsReporterAutoGeneratedClientId
@Test public void testMetricsReporterAutoGeneratedClientId() -
testDisableJmxReporter
@Test public void testDisableJmxReporter() -
testExplicitlyEnableJmxReporter
@Test public void testExplicitlyEnableJmxReporter() -
testExplicitlyEnableTelemetryReporter
@Test public void testExplicitlyEnableTelemetryReporter() -
testTelemetryReporterIsDisabledByDefault
@Test public void testTelemetryReporterIsDisabledByDefault() -
testCloseAdminClient
@Test public void testCloseAdminClient() -
testCloseAdminClientInCallback
Test if admin client can be closed in the callback invoked when an api call completes. If callingAdmin.close()in callback, AdminClient thread hangs- Throws:
InterruptedException
-
testAdminClientFailureWhenClosed
@Test public void testAdminClientFailureWhenClosed() -
testTimeoutWithoutMetadata
-
testConnectionFailureOnMetadataUpdate
-
testUnreachableBootstrapServer
-
testUnreachableBootstrapServerNoRebootstrap
-
testPropagatedMetadataFetchException
-
testAdminClientApisAuthenticationFailure
@Test public void testAdminClientApisAuthenticationFailure() -
testDescribeCluster
-
testDescribeClusterHandleError
@Test public void testDescribeClusterHandleError() -
testDescribeClusterFailBack
-
testDescribeClusterHandleUnsupportedVersionForIncludingFencedBrokers
@Test public void testDescribeClusterHandleUnsupportedVersionForIncludingFencedBrokers() -
testUpdateFeaturesDuringSuccess
-
testUpdateFeaturesTopLevelError
-
testUpdateFeaturesHandleNotControllerException
-
testUpdateFeaturesShouldFailRequestForEmptyUpdates
@Test public void testUpdateFeaturesShouldFailRequestForEmptyUpdates() -
testUpdateFeaturesShouldFailRequestForInvalidFeatureName
@Test public void testUpdateFeaturesShouldFailRequestForInvalidFeatureName() -
testUpdateFeaturesShouldFailRequestInClientWhenDowngradeFlagIsNotSetDuringDeletion
@Test public void testUpdateFeaturesShouldFailRequestInClientWhenDowngradeFlagIsNotSetDuringDeletion() -
testDescribeFeaturesSuccess
-
testDescribeFeaturesFailure
@Test public void testDescribeFeaturesFailure() -
testDescribeFeaturesWithNodeSuccess
-
testDescribeFeaturesWithNodeFailure
-
testDescribeMetadataQuorumSuccess
-
testDescribeMetadataQuorumRetriableError
-
testDescribeMetadataQuorumFailure
@Test public void testDescribeMetadataQuorumFailure() -
testGetSubLevelError
@Test public void testGetSubLevelError() -
testSuccessfulRetryAfterRequestTimeout
-
testDefaultApiTimeout
-
testDefaultApiTimeoutOverride
-
testRequestTimeoutExceedingDefaultApiTimeout
-
testUnregisterBrokerSuccess
-
testUnregisterBrokerFailure
-
testUnregisterBrokerTimeoutAndSuccessRetry
@Test public void testUnregisterBrokerTimeoutAndSuccessRetry() throws ExecutionException, InterruptedException -
testUnregisterBrokerTimeoutAndFailureRetry
@Test public void testUnregisterBrokerTimeoutAndFailureRetry() throws ExecutionException, InterruptedException -
testUnregisterBrokerTimeoutMaxRetry
@Test public void testUnregisterBrokerTimeoutMaxRetry() throws ExecutionException, InterruptedException -
testUnregisterBrokerTimeoutMaxWait
@Test public void testUnregisterBrokerTimeoutMaxWait() throws ExecutionException, InterruptedException -
testUnregisterControllerSuccess
-
testUnregisterControllerFailure
-
testUnregisterControllerTimeoutAndSuccessRetry
@Test public void testUnregisterControllerTimeoutAndSuccessRetry() throws ExecutionException, InterruptedException -
testUnregisterControllerTimeoutAndFailureRetry
@Test public void testUnregisterControllerTimeoutAndFailureRetry() throws ExecutionException, InterruptedException -
testUnregisterControllerTimeoutMaxRetry
@Test public void testUnregisterControllerTimeoutMaxRetry() throws ExecutionException, InterruptedException -
testUnregisterControllerTimeoutMaxWait
@Test public void testUnregisterControllerTimeoutMaxWait() throws ExecutionException, InterruptedException -
testClientSideTimeoutAfterFailureToSend
-
testClientSideTimeoutAfterFailureToReceiveResponse
-
testClientInstanceId
@Test public void testClientInstanceId() -
testClientInstanceIdInvalidTimeout
@Test public void testClientInstanceIdInvalidTimeout() -
testClientInstanceIdNoTelemetryReporterRegistered
@Test public void testClientInstanceIdNoTelemetryReporterRegistered() -
testListClientMetricsResources
-
testListClientMetricsResourcesEmpty
-
testListClientMetricsResourcesNotSupported
@Test public void testListClientMetricsResourcesNotSupported() -
testListConfigResources
-
testListConfigResourcesEmpty
-
testListConfigResourcesNotSupported
@Test public void testListConfigResourcesNotSupported() -
testCallFailWithUnsupportedVersionExceptionDoesNotHaveConcurrentModificationException
@Test public void testCallFailWithUnsupportedVersionExceptionDoesNotHaveConcurrentModificationException() throws InterruptedException- Throws:
InterruptedException
-
testAddRaftVoterRequest
-
testRemoveRaftVoterRequest
-
testOutOfMemoryErrorPropagation
Test that OutOfMemoryError is properly propagated and not masked as TimeoutException. This test simulates an OOM error during response processing and verifies it propagates without being wrapped. This is a regression test for KAFKA-19932.- Throws:
Exception
-
tearDown
-
testAlterBrokerReplicaExclusionHandlesNotControllerException
-
testAlterBrokerReplicaExclusionHandlesClusterAuthorizationException
-
testAlterBrokerReplicaExclusionHandlesTimeoutException
-
testAlterBrokerReplicaExclusionHandlesInvalidReasons
-
testAlterBrokerReplicaExclusionThrowsUnrepresentableBrokerIdException
-
testAlterBrokerReplicaExclusionExclusionLevelException
-
testAlterBrokerReplicaExclusionSuccess
-
testDescribeBrokerReplicaExclusionHandlesNotControllerException
-
testDescribeBrokerReplicaExclusionHandlesClusterAuthorizationException
-
testDescribeBrokerReplicaExclusionHandlesTimeoutException
-
testDescribeBrokerReplicaExclusionSuccess
-
testRemoveBrokersHandlesNotControllerException
-
testRemoveBrokersHandlesClusterAuthorizationException
-
testRemoveBrokersHandlesInvalidRequestException
-
testRemoveBrokersHandlesTimeoutException
-
testRemoveBrokersHandlesBrokerLevelException
-
testRemoveBrokersRequest
-
testChangeReplicationFactorRequest
-
testChangeReplicationFactorHandlesNotControllerException
-
testChangeReplicationFactorHandlesTopLevelException
-
testChangeReplicationFactorHandlesTimeoutException
-
testChangeReplicationFactorRejectsInvalidInput
-
testAddBrokersRequest
-
testAddBrokersHandlesNotControllerException
-
testAddBrokersHandlesTopLevelException
-
testAddBrokersHandlesTimeoutException
-
testAddBrokersRejectsInvalidInput
-
testDescribeReplicationFactorChangeHandlesNotControllerException
-
testDescribeReplicationFactorChangeReturnsEmptyWhenNoneTracked
-
testDescribeReplicationFactorChangeHandlesTopLevelException
-
testDescribeReplicationFactorChangeHandlesTimeoutException
-
testDescribeReplicationFactorChangePopulatesPerTopicFields
-
testDescribeReplicationFactorChangeHandlesUnknownStatus
-
testDescribeReplicationFactorChangeHandlesUnknownAction
-
testCancelReplicationFactorChangeRequest
-
testCancelReplicationFactorChangeHandlesNotControllerException
-
testCancelReplicationFactorChangeHandlesTopLevelException
-
testCancelReplicationFactorChangeHandlesTimeoutException
-
testCancelReplicationFactorChangeRejectsInvalidInput
-
testDescribeBalancerStatusHandlesNotControllerException
-
testDescribeBalancerStatusHandlesClusterAuthorizationException
-
testDescribeBalancerStatusHandlesTimeoutException
-
testDescribeBalancerStatusNoErrors
-
testDescribeBalancerStatusWithUnknownStatusValue
-
testTriggerEvenClusterLoadHandlesNotControllerException
-
testTriggerEvenClusterLoadHandlesClusterAuthorizationException
-
testTriggerEvenClusterLoadHandlesTimeoutException
-
testTriggerEvenClusterLoadWithError
-
testTriggerEvenClusterLoadSuccess
-
testComputeEvenClusterLoadPlanHandlesNotControllerException
-
testComputeEvenClusterLoadPlanHandlesClusterAuthorizationException
-
testComputeEvenClusterLoadPlanHandlesTimeoutException
-
testComputeEvenClusterLoadPlanWithError
-
testComputeEvenClusterLoadPlanSuccess
-
testDescribeEvenClusterLoadStatusHandlesNotControllerException
-
testDescribeEvenClusterLoadStatusHandlesClusterAuthorizationException
-
testDescribeEvenClusterLoadStatusHandlesTimeoutException
-
testDescribeEvenClusterLoadStatusNoErrors
-
testDescribeEvenClusterLoadStatusWithUnknownStatusValues
-
testDescribeEvenClusterLoadStatusWithNullStatusValues
-
testRemoveBrokerWithValidBrokerIds
-
testRemoveBrokersHandlesInvalidBrokerIds
-
testDescribeBrokerRemovalsHandlesNotControllerException
-
testDescribeBrokerRemovalsHandlesTopLevelException
-
testDescribeBrokerRemovalsHandlesTimeoutException
-
testDescribeBrokerRemovalsHandlesBrokerLevelRemovalExceptions
-
testDescribeBrokerRemovalsHandlesRequestsWithoutExclusionRelatedFields
-
testDescribeBrokerRemovalsHandlesRequestsWithUnknownStatusFields
-
testDescribeBrokerRemovalsPopulatesRightBrokerRemovalLevelExceptions
@Test public void testDescribeBrokerRemovalsPopulatesRightBrokerRemovalLevelExceptions() throws ExecutionException, InterruptedException -
testDescribeTopicWithObserver
-
testMetadataRetries
-
testDescribeTopicWithObserverWithDescribeTopicPartitionsApi
-
testDescribeBrokerAdditionsHandlesNotController
-
testDescribeBrokerAdditionsHandlesTopLevelError
@Test public void testDescribeBrokerAdditionsHandlesTopLevelError() -
testDescribeBrokerAdditionsHandlesBrokerLevelErrors
-
testDescribeBrokerAdditionsHandlesTimeoutException
-
testDescribeBrokerAdditionsHandlesUnrecognizedStatusValues
-
testDescribeVirtualTopicById
-
testListConsumerGroupOffsetsRetriableErrorsWithMultipleGroups
@Test public void testListConsumerGroupOffsetsRetriableErrorsWithMultipleGroups() throws ExecutionException, InterruptedException -
testListConsumerGroupOffsetsNonRetriableErrorsWithMultipleGroups
@Test public void testListConsumerGroupOffsetsNonRetriableErrorsWithMultipleGroups() -
testListConsumerGroupOffsetsWithMultipleGroups
-
testClusterLinkIncrementalAlterConfigs
-
testListPartitionReassignmentsWithObservers
-
testReplicaStatus
-
testReplicaStatusErrors
-
testResolveOffsetRange
-
testResolveOffsetRangeWithByokEncryption
-
testResolveOffsetRangeWithByokEncryptionCombinedObject
-
testResolveOffsetRangeWithoutByokEncryption
-
testResolveOffsetRangeRetriableErrors
-
testResolveOffsetRangeNonRetriableErrors
-
testDescribeFeaturesWithNonRegisteredNode
-
testCreateClusterLinks
-
testCreateClusterLinksRetriableErrors
-
testCreateClusterLinksNonRetriableErrors
-
testListClusterLinks
-
testListClusterLinksRetriableErrors
-
testListClusterLinksNonRetriableErrors
-
testDescribeClusterLinksToAllBrokersHappyPath
-
testDescribeClusterLinksUsingFindCoordinatorHappyPath
-
testDescribeMirrorsUsingController
-
testDescribeSwitchoverStatusHappyPath
-
testDescribeSwitchoverStatusWithNonMirrorTopic
-
testDescribeSwitchoverStatusFailsOnClusterAuthorization
-
testDescribeSwitchoverStatusFailsOnUnsupportedVersion
-
testDescribeMirrorsUsingFindCoordinatorHappyPath
-
testDescribeMirrorsUsesControllerAfterUnsupportedVersionException
-
testDescribeMirrorsUsesControllerForSubsetOfTopicsAfterUnsupportedVersionException
-
testDescribeMirrorsUsesControllerAfterInvalidRequestFromFindCoordinators
-
testDescribeMirrorsUsingFindCoordinatorRetriesWhenCoordinatorLoading
-
testDescribeMirrorsUsingFindCoordinatorRetriesWhenCoordinatorChanges
-
testDescribeMirrorsUsingFindCoordinatorFailsOnClusterAuthorization
-
testDescribeClusterLinksUsingFindCoordinatorRetriesWhenCoordinatorIsLoading
-
testDescribeClusterLinksUsingFindCoordinatorRelookUp
-
testDescribeClusterLinksToAllBrokersRetries
-
testDescribeClusterLinksToAllBrokersNonRetriableErrors
-
testDescribeClusterLinksToAllBrokersDisabledReturnsDefaultMessage
-
testDescribeClusterLinksTriesUsingCoordinatorsThenUsesController
-
testDescribeClusterLinksUsesFindCoordinatorThenUsesController
-
testDescribeClusterLinksFailsOnFindCoordinatorThenUsesController
-
testDescribeClusterLinksUsingFindCoordinatorFailsOnNonRetriableError
-
testDeleteClusterLinks
-
testDeleteClusterLinksRetriableErrors
-
testDeleteClusterLinksNonRetriableErrors
-
testAlterMirrors
-
testAlterMirrorsVersion1
-
testAlterMirrorsRetriableErrors
-
testAlterMirrorsNonRetriableErrors
-
testUpdateLicense
-
testUpdateLicenseDryRunPropagatesFlag
-
testUpdateLicenseError
-
testGetLicenses
-
testAlterBrokerHealth
-
testAlterBrokerHealthHandlesNotControllerException
-
testAlterBrokerHealthExceptionHandling
-
testAlterBrokerHealthHandlesTimeoutException
-
testDescribeBrokerHealth
-
testDescribeNetwork
-
testDescribeCellLoad
-
testDescribeBrokerHealthHandlesNotControllerException
-
testDescribeBrokerHealthHandlesClusterAuthorizationException
-
testDescribeBrokerHealthHandlesTimeoutException
-
testDescribeBrokerHealthOlderBrokerVersion
-
testInterceptor
-
testAdminBootstrapResolutionExceptionPropagated
-
testAdminConstructorFailsWithConfigExceptionOnUnresolvableBootstrapWhenTimeoutZero
@Test public void testAdminConstructorFailsWithConfigExceptionOnUnresolvableBootstrapWhenTimeoutZero()
-