Class KafkaAdminClientTopicTest
java.lang.Object
org.apache.kafka.clients.admin.KafkaAdminClientTestBase
org.apache.kafka.clients.admin.KafkaAdminClientTopicTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.common.requests.DeleteTopicsResponseprepareDeleteTopicsResponse(int throttleTimeMs, org.apache.kafka.common.message.DeleteTopicsResponseData.DeletableTopicResult... topics) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidtestListOffsetsMetadataNonRetriableErrors(org.apache.kafka.common.protocol.Errors topicMetadataError, org.apache.kafka.common.protocol.Errors partitionMetadataError, Class<? extends Throwable> expectedFailure) voidvoidvoidvoidvoidvoidReproduces the scenario where the partition leader cache holds an entry pointing at a broker that has since left the cluster (for example after a broker is recycled with a new id).voidvoidvoidvoid
-
Constructor Details
-
KafkaAdminClientTopicTest
public KafkaAdminClientTopicTest()
-
-
Method Details
-
testCreateTopics
-
testCreateTopicsPartialResponse
-
testCreateTopicsRetryBackoff
-
testCreateTopicsHandleNotControllerException
-
testCreateTopicsRetryThrottlingExceptionWhenEnabled
-
testCreateTopicsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut
-
testCreateTopicsDontRetryThrottlingExceptionWhenDisabled
-
testCreateTopicsInjectsLargeAssociationFromTaggedField
-
testCreateTopicsPrefersTaggedAssociationOverConflictingInline
-
testDeleteTopics
-
testDeleteTopicsPartialResponse
-
testDeleteTopicsRetryThrottlingExceptionWhenEnabled
-
testDeleteTopicsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut
-
testDeleteTopicsDontRetryThrottlingExceptionWhenDisabled
-
testInvalidTopicNames
-
testDescribeTopicsWithDescribeTopicPartitionsApiBasic
@Test public void testDescribeTopicsWithDescribeTopicPartitionsApiBasic() throws ExecutionException, InterruptedException -
testDescribeTopicPartitionsApiWithAuthorizedOps
@Test public void testDescribeTopicPartitionsApiWithAuthorizedOps() throws ExecutionException, InterruptedException -
testDescribeTopicPartitionsApiWithoutAuthorizedOps
@Test public void testDescribeTopicPartitionsApiWithoutAuthorizedOps() throws ExecutionException, InterruptedException -
testDescribeTopicsWithDescribeTopicPartitionsApiEdgeCase
@Test public void testDescribeTopicsWithDescribeTopicPartitionsApiEdgeCase() throws ExecutionException, InterruptedException -
testDescribeTopicsWithDescribeTopicPartitionsApiErrorHandling
@Test public void testDescribeTopicsWithDescribeTopicPartitionsApiErrorHandling() throws InterruptedException- Throws:
InterruptedException
-
testElectLeaders
-
testDescribeLogDirs
-
testDescribeLogDirsWithVolumeBytes
@Test public void testDescribeLogDirsWithVolumeBytes() throws ExecutionException, InterruptedException -
testDescribeLogDirsOfflineDir
-
testDescribeLogDirsWithCordonedDir
@Test public void testDescribeLogDirsWithCordonedDir() throws ExecutionException, InterruptedException -
testDescribeReplicaLogDirs
-
testDescribeReplicaLogDirsUnexpected
@Test public void testDescribeReplicaLogDirsUnexpected() throws ExecutionException, InterruptedException -
testCreatePartitions
-
testCreatePartitionsRetryThrottlingExceptionWhenEnabled
-
testCreatePartitionsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut
-
testCreatePartitionsDontRetryThrottlingExceptionWhenDisabled
-
testDeleteRecordsTopicAuthorizationError
@Test public void testDeleteRecordsTopicAuthorizationError() -
testDeleteRecordsMultipleSends
-
testDeleteRecords
-
testDescribeTopicsByIds
-
testAlterPartitionReassignments
-
testListPartitionReassignments
-
testListOffsets
-
testListOffsetsRetriesLookupWhenCachedLeaderLeavesCluster
Reproduces the scenario where the partition leader cache holds an entry pointing at a broker that has since left the cluster (for example after a broker is recycled with a new id). The cached leader sends the request straight to the fulfillment stage, but the admin client can never route it because the broker is no longer in the metadata. Without re-running the lookup, the call would sit unassigned until the request deadline expires and fail with "Timed out waiting for a node assignment". The admin client should instead re-resolve the leader and complete the request.- Throws:
Exception
-
testListOffsetsRetriableErrors
-
testListOffsetsNonRetriableErrors
-
testListOffsetsMaxTimestampUnsupportedSingleOffsetSpec
@Test public void testListOffsetsMaxTimestampUnsupportedSingleOffsetSpec() -
testListOffsetsMaxTimestampUnsupportedMultipleOffsetSpec
-
testListOffsetsHandlesFulfillmentTimeouts
-
testListOffsetsUnsupportedNonMaxTimestamp
@Test public void testListOffsetsUnsupportedNonMaxTimestamp() -
testListOffsetsNonMaxTimestampDowngradedImmediately
-
testListOffsetsEarliestLocalSpecMinVersion
-
testListOffsetsLatestTierSpecSpecMinVersion
-
testListOffsetsEarliestPendingUploadSpecSpecMinVersion
-
testListOffsetsMetadataRetriableErrors
-
testListOffsetsWithMultiplePartitionsLeaderChange
-
testListOffsetsWithLeaderChange
-
testListOffsetsMetadataNonRetriableErrors
@ParameterizedTest @MethodSource("listOffsetsMetadataNonRetriableErrors") public void testListOffsetsMetadataNonRetriableErrors(org.apache.kafka.common.protocol.Errors topicMetadataError, org.apache.kafka.common.protocol.Errors partitionMetadataError, Class<? extends Throwable> expectedFailure) throws Exception - Throws:
Exception
-
testListOffsetsPartialResponse
-
testAlterReplicaLogDirsSuccess
-
testAlterReplicaLogDirsLogDirNotFound
-
testAlterReplicaLogDirsUnrequested
-
testAlterReplicaLogDirsPartialResponse
-
testAlterReplicaLogDirsPartialFailure
-
testDescribeLogDirsPartialFailure
-
testDescribeReplicaLogDirsWithNonExistReplica
-
testDescribeTopicsTimeoutWhenNoBrokerResponds
-
prepareDeleteTopicsResponse
public static org.apache.kafka.common.requests.DeleteTopicsResponse prepareDeleteTopicsResponse(int throttleTimeMs, org.apache.kafka.common.message.DeleteTopicsResponseData.DeletableTopicResult... topics)
-