From d05c0394c976bf547026cfb9344f8ac5c34d1dc4 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Thu, 29 Feb 2024 15:52:53 +0100 Subject: [PATCH] OZG-4949 Clear Monogdb before each test instead of after --- .../de/ozgcloud/admin/settings/postfach/PostfachITCase.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/java/de/ozgcloud/admin/settings/postfach/PostfachITCase.java b/src/test/java/de/ozgcloud/admin/settings/postfach/PostfachITCase.java index 350567a1..a00766ee 100644 --- a/src/test/java/de/ozgcloud/admin/settings/postfach/PostfachITCase.java +++ b/src/test/java/de/ozgcloud/admin/settings/postfach/PostfachITCase.java @@ -8,7 +8,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import java.util.List; import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @@ -52,7 +51,7 @@ class PostfachITCase { .settingsBody(PostfachTestFactory.create()) .build(); - @AfterEach + @BeforeEach void clear() { mongoOperations.dropCollection(Settings.class); } @@ -236,7 +235,6 @@ class PostfachITCase { @BeforeEach void init() { - mongoOperations.dropCollection(Settings.class); id = mongoOperations.save(settingsWithPostfach).getId(); } -- GitLab