use of org.apache.kafka.common.requests.FindCoordinatorRequest in project kafka by apache.
the class TransactionManagerTest method testUnsupportedFindCoordinator.
@Test
public void testUnsupportedFindCoordinator() {
transactionManager.initializeTransactions();
client.prepareUnsupportedVersionResponse(body -> {
FindCoordinatorRequest findCoordinatorRequest = (FindCoordinatorRequest) body;
assertEquals(CoordinatorType.forId(findCoordinatorRequest.data().keyType()), CoordinatorType.TRANSACTION);
assertEquals(findCoordinatorRequest.data().key(), transactionalId);
return true;
});
runUntil(transactionManager::hasFatalError);
assertTrue(transactionManager.hasFatalError());
assertTrue(transactionManager.lastError() instanceof UnsupportedVersionException);
}
Aggregations