Class KafkaAdminClientTopicTest

java.lang.Object
org.apache.kafka.clients.admin.KafkaAdminClientTestBase
org.apache.kafka.clients.admin.KafkaAdminClientTopicTest

public class KafkaAdminClientTopicTest extends KafkaAdminClientTestBase
  • Constructor Details

    • KafkaAdminClientTopicTest

      public KafkaAdminClientTopicTest()
  • Method Details

    • testCreateTopics

      @Test public void testCreateTopics() throws Exception
      Throws:
      Exception
    • testCreateTopicsPartialResponse

      @Test public void testCreateTopicsPartialResponse() throws Exception
      Throws:
      Exception
    • testCreateTopicsRetryBackoff

      @Test public void testCreateTopicsRetryBackoff() throws Exception
      Throws:
      Exception
    • testCreateTopicsHandleNotControllerException

      @Test public void testCreateTopicsHandleNotControllerException() throws Exception
      Throws:
      Exception
    • testCreateTopicsRetryThrottlingExceptionWhenEnabled

      @Test public void testCreateTopicsRetryThrottlingExceptionWhenEnabled() throws Exception
      Throws:
      Exception
    • testCreateTopicsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut

      @Test public void testCreateTopicsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut() throws Exception
      Throws:
      Exception
    • testCreateTopicsDontRetryThrottlingExceptionWhenDisabled

      @Test public void testCreateTopicsDontRetryThrottlingExceptionWhenDisabled() throws Exception
      Throws:
      Exception
    • testCreateTopicsInjectsLargeAssociationFromTaggedField

      @Test public void testCreateTopicsInjectsLargeAssociationFromTaggedField() throws Exception
      Throws:
      Exception
    • testCreateTopicsPrefersTaggedAssociationOverConflictingInline

      @Test public void testCreateTopicsPrefersTaggedAssociationOverConflictingInline() throws Exception
      Throws:
      Exception
    • testDeleteTopics

      @Test public void testDeleteTopics() throws Exception
      Throws:
      Exception
    • testDeleteTopicsPartialResponse

      @Test public void testDeleteTopicsPartialResponse() throws Exception
      Throws:
      Exception
    • testDeleteTopicsRetryThrottlingExceptionWhenEnabled

      @Test public void testDeleteTopicsRetryThrottlingExceptionWhenEnabled() throws Exception
      Throws:
      Exception
    • testDeleteTopicsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut

      @Test public void testDeleteTopicsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut() throws Exception
      Throws:
      Exception
    • testDeleteTopicsDontRetryThrottlingExceptionWhenDisabled

      @Test public void testDeleteTopicsDontRetryThrottlingExceptionWhenDisabled() throws Exception
      Throws:
      Exception
    • testInvalidTopicNames

      @Test public void testInvalidTopicNames() throws Exception
      Throws:
      Exception
    • testDescribeTopicsWithDescribeTopicPartitionsApiBasic

      @Test public void testDescribeTopicsWithDescribeTopicPartitionsApiBasic() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeTopicPartitionsApiWithAuthorizedOps

      @Test public void testDescribeTopicPartitionsApiWithAuthorizedOps() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeTopicPartitionsApiWithoutAuthorizedOps

      @Test public void testDescribeTopicPartitionsApiWithoutAuthorizedOps() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeTopicsWithDescribeTopicPartitionsApiEdgeCase

      @Test public void testDescribeTopicsWithDescribeTopicPartitionsApiEdgeCase() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeTopicsWithDescribeTopicPartitionsApiErrorHandling

      @Test public void testDescribeTopicsWithDescribeTopicPartitionsApiErrorHandling() throws InterruptedException
      Throws:
      InterruptedException
    • testElectLeaders

      @Test public void testElectLeaders() throws Exception
      Throws:
      Exception
    • testDescribeLogDirs

      @Test public void testDescribeLogDirs() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeLogDirsWithVolumeBytes

      @Test public void testDescribeLogDirsWithVolumeBytes() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeLogDirsOfflineDir

      @Test public void testDescribeLogDirsOfflineDir() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeLogDirsWithCordonedDir

      @Test public void testDescribeLogDirsWithCordonedDir() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeReplicaLogDirs

      @Test public void testDescribeReplicaLogDirs() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testDescribeReplicaLogDirsUnexpected

      @Test public void testDescribeReplicaLogDirsUnexpected() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testCreatePartitions

      @Test public void testCreatePartitions() throws Exception
      Throws:
      Exception
    • testCreatePartitionsRetryThrottlingExceptionWhenEnabled

      @Test public void testCreatePartitionsRetryThrottlingExceptionWhenEnabled() throws Exception
      Throws:
      Exception
    • testCreatePartitionsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut

      @Test public void testCreatePartitionsRetryThrottlingExceptionWhenEnabledUntilRequestTimeOut() throws Exception
      Throws:
      Exception
    • testCreatePartitionsDontRetryThrottlingExceptionWhenDisabled

      @Test public void testCreatePartitionsDontRetryThrottlingExceptionWhenDisabled() throws Exception
      Throws:
      Exception
    • testDeleteRecordsTopicAuthorizationError

      @Test public void testDeleteRecordsTopicAuthorizationError()
    • testDeleteRecordsMultipleSends

      @Test public void testDeleteRecordsMultipleSends() throws Exception
      Throws:
      Exception
    • testDeleteRecords

      @Test public void testDeleteRecords() throws Exception
      Throws:
      Exception
    • testDescribeTopicsByIds

      @Test public void testDescribeTopicsByIds() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testAlterPartitionReassignments

      @Test public void testAlterPartitionReassignments() throws Exception
      Throws:
      Exception
    • testListPartitionReassignments

      @Test public void testListPartitionReassignments() throws Exception
      Throws:
      Exception
    • testListOffsets

      @Test public void testListOffsets() throws Exception
      Throws:
      Exception
    • testListOffsetsRetriesLookupWhenCachedLeaderLeavesCluster

      @Test public void testListOffsetsRetriesLookupWhenCachedLeaderLeavesCluster() throws Exception
      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

      @Test public void testListOffsetsRetriableErrors() throws Exception
      Throws:
      Exception
    • testListOffsetsNonRetriableErrors

      @Test public void testListOffsetsNonRetriableErrors() throws Exception
      Throws:
      Exception
    • testListOffsetsMaxTimestampUnsupportedSingleOffsetSpec

      @Test public void testListOffsetsMaxTimestampUnsupportedSingleOffsetSpec()
    • testListOffsetsMaxTimestampUnsupportedMultipleOffsetSpec

      @Test public void testListOffsetsMaxTimestampUnsupportedMultipleOffsetSpec() throws Exception
      Throws:
      Exception
    • testListOffsetsHandlesFulfillmentTimeouts

      @Test public void testListOffsetsHandlesFulfillmentTimeouts() throws Exception
      Throws:
      Exception
    • testListOffsetsUnsupportedNonMaxTimestamp

      @Test public void testListOffsetsUnsupportedNonMaxTimestamp()
    • testListOffsetsNonMaxTimestampDowngradedImmediately

      @Test public void testListOffsetsNonMaxTimestampDowngradedImmediately() throws Exception
      Throws:
      Exception
    • testListOffsetsEarliestLocalSpecMinVersion

      @Test public void testListOffsetsEarliestLocalSpecMinVersion() throws Exception
      Throws:
      Exception
    • testListOffsetsLatestTierSpecSpecMinVersion

      @Test public void testListOffsetsLatestTierSpecSpecMinVersion() throws Exception
      Throws:
      Exception
    • testListOffsetsEarliestPendingUploadSpecSpecMinVersion

      @Test public void testListOffsetsEarliestPendingUploadSpecSpecMinVersion() throws Exception
      Throws:
      Exception
    • testListOffsetsMetadataRetriableErrors

      @Test public void testListOffsetsMetadataRetriableErrors() throws Exception
      Throws:
      Exception
    • testListOffsetsWithMultiplePartitionsLeaderChange

      @Test public void testListOffsetsWithMultiplePartitionsLeaderChange() throws Exception
      Throws:
      Exception
    • testListOffsetsWithLeaderChange

      @Test public void testListOffsetsWithLeaderChange() throws Exception
      Throws:
      Exception
    • 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

      @Test public void testListOffsetsPartialResponse() throws Exception
      Throws:
      Exception
    • testAlterReplicaLogDirsSuccess

      @Test public void testAlterReplicaLogDirsSuccess() throws Exception
      Throws:
      Exception
    • testAlterReplicaLogDirsLogDirNotFound

      @Test public void testAlterReplicaLogDirsLogDirNotFound() throws Exception
      Throws:
      Exception
    • testAlterReplicaLogDirsUnrequested

      @Test public void testAlterReplicaLogDirsUnrequested() throws Exception
      Throws:
      Exception
    • testAlterReplicaLogDirsPartialResponse

      @Test public void testAlterReplicaLogDirsPartialResponse() throws Exception
      Throws:
      Exception
    • testAlterReplicaLogDirsPartialFailure

      @Test public void testAlterReplicaLogDirsPartialFailure() throws Exception
      Throws:
      Exception
    • testDescribeLogDirsPartialFailure

      @Test public void testDescribeLogDirsPartialFailure() throws Exception
      Throws:
      Exception
    • testDescribeReplicaLogDirsWithNonExistReplica

      @Test public void testDescribeReplicaLogDirsWithNonExistReplica() throws Exception
      Throws:
      Exception
    • testDescribeTopicsTimeoutWhenNoBrokerResponds

      @Test @Timeout(30L) public void testDescribeTopicsTimeoutWhenNoBrokerResponds() throws Exception
      Throws:
      Exception
    • prepareDeleteTopicsResponse

      public static org.apache.kafka.common.requests.DeleteTopicsResponse prepareDeleteTopicsResponse(int throttleTimeMs, org.apache.kafka.common.message.DeleteTopicsResponseData.DeletableTopicResult... topics)