Class OffsetsRequestManagerTest

java.lang.Object
org.apache.kafka.clients.consumer.internals.OffsetsRequestManagerTest

public class OffsetsRequestManagerTest extends Object
  • Constructor Details

    • OffsetsRequestManagerTest

      public OffsetsRequestManagerTest()
  • Method Details

    • setup

      @BeforeEach public void setup()
    • testListOffsetsRequest_Success

      @Test public void testListOffsetsRequest_Success() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testListOffsetsWaitingForMetadataUpdate_Timeout

      @Test public void testListOffsetsWaitingForMetadataUpdate_Timeout()
    • testListOffsetsRequestMultiplePartitions

      @Test public void testListOffsetsRequestMultiplePartitions() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testListOffsetsRequestEmpty

      @Test public void testListOffsetsRequestEmpty() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testListOffsetsRequestUnknownOffset

      @Test public void testListOffsetsRequestUnknownOffset() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testListOffsetsWaitingForMetadataUpdate_RetrySucceeds

      @Test public void testListOffsetsWaitingForMetadataUpdate_RetrySucceeds() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testFetchOffsetsRegroupSkipsNullLeaderPartitionNoNPE

      @Test public void testFetchOffsetsRegroupSkipsNullLeaderPartitionNoNPE() throws ExecutionException, InterruptedException
      Test for KAFKA-20312: when regroupPartitionMapByNode sees a partition with null leader (e.g. metadata race), it should skip that partition and add it to remainingToSearch instead of throwing NullPointerException.
      Throws:
      ExecutionException
      InterruptedException
    • testRequestFailsWithRetriableError_RetrySucceeds

      @ParameterizedTest @MethodSource("retriableErrors") public void testRequestFailsWithRetriableError_RetrySucceeds(org.apache.kafka.common.protocol.Errors error) throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testRequestNotSupportedErrorReturnsNullOffset

      @Test public void testRequestNotSupportedErrorReturnsNullOffset() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testRequestWithUnknownOffsetInResponseReturnsNullOffset

      @Test public void testRequestWithUnknownOffsetInResponseReturnsNullOffset() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testRequestPartiallyFailsWithRetriableError_RetrySucceeds

      @Test public void testRequestPartiallyFailsWithRetriableError_RetrySucceeds() throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • testRequestFailedResponse_NonRetriableAuthError

      @Test public void testRequestFailedResponse_NonRetriableAuthError()
    • testRequestFailedResponse_NonRetriableErrorTimeout

      @Test public void testRequestFailedResponse_NonRetriableErrorTimeout()
    • testRequestFails_AuthenticationException

      @Test public void testRequestFails_AuthenticationException()
    • testResetPositionsSendNoRequestIfNoPartitionsNeedingReset

      @Test public void testResetPositionsSendNoRequestIfNoPartitionsNeedingReset()
    • testResetPositionsMissingLeader

      @Test public void testResetPositionsMissingLeader()
    • testResetPositionsSuccess_NoLeaderEpochInResponse

      @Test public void testResetPositionsSuccess_NoLeaderEpochInResponse()
    • testResetPositionsSuccess_LeaderEpochInResponse

      @Test public void testResetPositionsSuccess_LeaderEpochInResponse()
    • testResetOffsetsAuthorizationFailure

      @Test public void testResetOffsetsAuthorizationFailure()
    • testValidatePositionsSuccess

      @Test public void testValidatePositionsSuccess()
    • testValidatePositionsMissingLeader

      @Test public void testValidatePositionsMissingLeader()
    • testValidatePositionsFailureWithUnrecoverableAuthException

      @Test public void testValidatePositionsFailureWithUnrecoverableAuthException()
    • testValidatePositionsAbortIfNoApiVersionsToCheckAgainstThenRecovers

      @Test public void testValidatePositionsAbortIfNoApiVersionsToCheckAgainstThenRecovers()
    • testUpdatePositionsWithCommittedOffsets

      @Test public void testUpdatePositionsWithCommittedOffsets()
    • testUpdatePositionsWithCommittedOffsetsReusesRequest

      @Test public void testUpdatePositionsWithCommittedOffsetsReusesRequest()
    • testUpdatePositionsDoesNotApplyOffsetsIfPartitionNotInitializingAnymore

      @Test public void testUpdatePositionsDoesNotApplyOffsetsIfPartitionNotInitializingAnymore()
    • testUpdatePositionsDoesNotResetPositionBeforeRetrievingOffsetsForNewlyAddedPartition

      @Test public void testUpdatePositionsDoesNotResetPositionBeforeRetrievingOffsetsForNewlyAddedPartition()
    • testRemoteListOffsetsRequestTimeoutMs

      @Test public void testRemoteListOffsetsRequestTimeoutMs()