Skip to content
Snippets Groups Projects
Commit 43d08082 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-2626 OZG-3065 remove @Async

parent 4965422e
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,6 @@ import java.util.List; ...@@ -5,7 +5,6 @@ import java.util.List;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -25,7 +24,6 @@ public class UserNotificationService { ...@@ -25,7 +24,6 @@ public class UserNotificationService {
@Autowired @Autowired
private UserRemoteService userRemoteService; private UserRemoteService userRemoteService;
@Async
public void sendNotification(@NotNull String organisationEinheitId) { public void sendNotification(@NotNull String organisationEinheitId) {
var recipients = userRemoteService.getRecipients(organisationEinheitId); var recipients = userRemoteService.getRecipients(organisationEinheitId);
emailRemoteService.sendEmail(buildUserEmail(recipients)); emailRemoteService.sendEmail(buildUserEmail(recipients));
......
...@@ -11,17 +11,15 @@ import org.junit.jupiter.api.Nested; ...@@ -11,17 +11,15 @@ import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.security.test.context.support.WithMockUser;
import de.itvsh.kop.common.test.DataITCase; import de.itvsh.kop.common.test.ITCase;
import de.itvsh.kop.notification.user.UserNotificationEventListener; import de.itvsh.kop.notification.user.UserNotificationEventListener;
import de.itvsh.kop.notification.vorgang.Vorgang; import de.itvsh.kop.notification.vorgang.Vorgang;
import de.itvsh.kop.notification.vorgang.VorgangId; import de.itvsh.kop.notification.vorgang.VorgangId;
import de.itvsh.kop.notification.vorgang.VorgangService; import de.itvsh.kop.notification.vorgang.VorgangService;
import de.itvsh.ozg.pluto.command.VorgangCreatedEvent; import de.itvsh.ozg.pluto.command.VorgangCreatedEvent;
@DataITCase @ITCase
@WithMockUser
public class UserNotificationITCase { public class UserNotificationITCase {
@Autowired @Autowired
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment