use of org.apache.atlas.model.notification.HookNotification in project atlas by apache.
the class AtlasHookTest method testNotifyEntitiesRetriesOnException.
@Test
public void testNotifyEntitiesRetriesOnException() throws NotificationException {
List<HookNotification> hookNotifications = new ArrayList<HookNotification>() {
{
add(new EntityCreateRequest("user"));
}
};
doThrow(new NotificationException(new Exception())).when(notificationInterface).send(NotificationInterface.NotificationType.HOOK, hookNotifications);
AtlasHook.notifyEntitiesInternal(hookNotifications, 2, notificationInterface, false, failedMessagesLogger);
verify(notificationInterface, times(2)).send(NotificationInterface.NotificationType.HOOK, hookNotifications);
}
Aggregations