Class CoordinatorRequestManagerTest

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

public class CoordinatorRequestManagerTest extends Object
  • Constructor Details

    • CoordinatorRequestManagerTest

      public CoordinatorRequestManagerTest()
  • Method Details

    • setup

      @BeforeEach public void setup()
    • testSuccessfulResponse

      @Test public void testSuccessfulResponse()
    • testMarkCoordinatorUnknownLoggingAccuracy

      @Test public void testMarkCoordinatorUnknownLoggingAccuracy()
      This test mimics a client that has been disconnected from the coordinator. When the client remains disconnected from the coordinator for 60 seconds, the client will begin to emit a warning log every minute thereafter to alert the user about the ongoing disconnect status. The warning log includes the length of time of the ongoing disconnect: Consumer has been disconnected from the group coordinator for XXXXXms

      However, the logic used to calculate the length of the disconnect was not correct. This test exercises the disconnect logic, controlling the logging and system time, to ensure the warning message is correct.

      See Also:
      • CoordinatorRequestManager.markCoordinatorUnknown(String, long)
    • testMarkCoordinatorUnknown

      @Test public void testMarkCoordinatorUnknown()
    • testBackoffAfterRetriableFailure

      @Test public void testBackoffAfterRetriableFailure()
    • testBackoffAfterFatalError

      @Test public void testBackoffAfterFatalError()
    • testNullGroupIdShouldThrow

      @Test public void testNullGroupIdShouldThrow()
    • testFindCoordinatorResponseVersions

      @Test public void testFindCoordinatorResponseVersions()
    • testNetworkTimeout

      @Test public void testNetworkTimeout()
    • testNoBusyPollWhileFindCoordinatorRequestInFlight

      @Test public void testNoBusyPollWhileFindCoordinatorRequestInFlight()
    • testClearFatalErrorWhenReceivingSuccessfulResponse

      @ParameterizedTest @EnumSource(value=org.apache.kafka.common.protocol.Errors.class, names={"NONE","COORDINATOR_NOT_AVAILABLE"}) public void testClearFatalErrorWhenReceivingSuccessfulResponse(org.apache.kafka.common.protocol.Errors error)