accessGerrit(supplier, consumer, project, "Failed to delete draft comment.");
}
private boolean testConnection(GerritAuthData gerritAuthData) throws RestApiException {
// we need to test with a temporary client with probably new (unsaved) credentials
GerritApi tempClient = createClientWithCustomAuthData(gerritAuthData);
if (gerritAuthData.isLoginAndPasswordAvailable()) {
AccountInfo user = tempClient.accounts().self().get();
return user != null;
} else {
tempClient.changes().query().withLimit(1).get();
return true;
}
}