use of org.apache.kafka.connect.errors.NotFoundException in project kafka by apache.
the class ConnectorsResourceTest method testGetConnectorConfigConnectorNotFound.
@Test
public void testGetConnectorConfigConnectorNotFound() {
final Capture<Callback<Map<String, String>>> cb = Capture.newInstance();
herder.connectorConfig(EasyMock.eq(CONNECTOR_NAME), EasyMock.capture(cb));
expectAndCallbackException(cb, new NotFoundException("not found"));
PowerMock.replayAll();
assertThrows(NotFoundException.class, () -> connectorsResource.getConnectorConfig(CONNECTOR_NAME, NULL_HEADERS, FORWARD));
PowerMock.verifyAll();
}
use of org.apache.kafka.connect.errors.NotFoundException in project kafka by apache.
the class ConnectorsResourceTest method testGetConnectorTaskConfigsConnectorNotFound.
@Test
public void testGetConnectorTaskConfigsConnectorNotFound() {
final Capture<Callback<List<TaskInfo>>> cb = Capture.newInstance();
herder.taskConfigs(EasyMock.eq(CONNECTOR_NAME), EasyMock.capture(cb));
expectAndCallbackException(cb, new NotFoundException("connector not found"));
PowerMock.replayAll();
assertThrows(NotFoundException.class, () -> connectorsResource.getTaskConfigs(CONNECTOR_NAME, NULL_HEADERS, FORWARD));
PowerMock.verifyAll();
}
use of org.apache.kafka.connect.errors.NotFoundException in project kafka by apache.
the class ConnectorsResourceTest method testRestartConnectorNotFound.
@Test
public void testRestartConnectorNotFound() {
final Capture<Callback<Void>> cb = Capture.newInstance();
herder.restartConnector(EasyMock.eq(CONNECTOR_NAME), EasyMock.capture(cb));
expectAndCallbackException(cb, new NotFoundException("not found"));
PowerMock.replayAll();
assertThrows(NotFoundException.class, () -> connectorsResource.restartConnector(CONNECTOR_NAME, NULL_HEADERS, false, false, FORWARD));
PowerMock.verifyAll();
}
Aggregations