From 7e2bc4643415e09b32a19432f973c3254018c7ff Mon Sep 17 00:00:00 2001 From: KWY Date: Sun, 1 Sep 2024 17:30:24 +0900 Subject: [PATCH] =?UTF-8?q?#332=20[test]=20=EC=9D=B8=EC=88=98=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EC=97=90=20transactional=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 테스트 이후 값이 초기화가 되지 않아서 다른 테스트가 실패했습니다. 따라서 테스트 이후 값을 초기화하기 위해서 인수 테스트에 transactional을 추가했습니다. --- .../com/asap/server/concurrency/DuplicatedInterceptorTest.java | 2 ++ .../presentation/controller/MeetingRetrieveControllerTest.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/test/java/com/asap/server/concurrency/DuplicatedInterceptorTest.java b/src/test/java/com/asap/server/concurrency/DuplicatedInterceptorTest.java index 9575eef9..b183f334 100644 --- a/src/test/java/com/asap/server/concurrency/DuplicatedInterceptorTest.java +++ b/src/test/java/com/asap/server/concurrency/DuplicatedInterceptorTest.java @@ -20,6 +20,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @@ -27,6 +28,7 @@ @SpringBootTest @AutoConfigureMockMvc +@Transactional public class DuplicatedInterceptorTest { @Autowired private MockMvc mockMvc; diff --git a/src/test/java/com/asap/server/presentation/controller/MeetingRetrieveControllerTest.java b/src/test/java/com/asap/server/presentation/controller/MeetingRetrieveControllerTest.java index 7773d447..bbb6f58d 100644 --- a/src/test/java/com/asap/server/presentation/controller/MeetingRetrieveControllerTest.java +++ b/src/test/java/com/asap/server/presentation/controller/MeetingRetrieveControllerTest.java @@ -16,7 +16,9 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import java.nio.charset.Charset; +import org.springframework.transaction.annotation.Transactional; +@Transactional @ExtendWith(MockitoExtension.class) public class MeetingRetrieveControllerTest {