|
18 | 18 | import org.junit.jupiter.api.BeforeEach; |
19 | 19 | import org.junit.jupiter.api.DisplayName; |
20 | 20 | import org.junit.jupiter.api.MethodOrderer; |
21 | | -import org.junit.jupiter.api.Order; |
22 | 21 | import org.junit.jupiter.api.Test; |
23 | 22 | import org.junit.jupiter.api.TestMethodOrder; |
24 | 23 | import org.junit.jupiter.api.extension.ExtendWith; |
@@ -69,7 +68,6 @@ void setUp() { |
69 | 68 | when(joinPoint.getArgs()).thenReturn(new Object[] {TEST_ROOM_ID}); |
70 | 69 | } |
71 | 70 |
|
72 | | - @Order(1) |
73 | 71 | @DisplayName("락 획득 성공 시 정상적으로 메서드가 실행되고, 락 해제가 호출되는지 확인") |
74 | 72 | @Test |
75 | 73 | void testLock_Success() throws Throwable { |
@@ -103,7 +101,6 @@ void testLock_Success() throws Throwable { |
103 | 101 | } |
104 | 102 | } |
105 | 103 |
|
106 | | - @Order(2) |
107 | 104 | @DisplayName("락 획득 실패 시 CustomException(LOCK_ACQUISITION_FAILED)이 발생하는지 확인") |
108 | 105 | @Test |
109 | 106 | void testLock_FailToAcquireLock() throws Throwable { |
@@ -138,7 +135,6 @@ void testLock_FailToAcquireLock() throws Throwable { |
138 | 135 | } |
139 | 136 | } |
140 | 137 |
|
141 | | - @Order(3) |
142 | 138 | @DisplayName("락 대기 중 인터럽트 발생 시 InterruptedException이 전파되는지 확인") |
143 | 139 | @Test |
144 | 140 | void testLock_InterruptedException() throws Throwable { |
@@ -173,7 +169,6 @@ void testLock_InterruptedException() throws Throwable { |
173 | 169 | } |
174 | 170 | } |
175 | 171 |
|
176 | | - @Order(4) |
177 | 172 | @DisplayName("락을 획득하지 않은 스레드가 unlock하지 않는지 확인") |
178 | 173 | @Test |
179 | 174 | void testLock_NotHeldByCurrentThread() throws Throwable { |
@@ -208,7 +203,6 @@ void testLock_NotHeldByCurrentThread() throws Throwable { |
208 | 203 | } |
209 | 204 | } |
210 | 205 |
|
211 | | - @Order(5) |
212 | 206 | @DisplayName("메서드 실행 중 예외 발생 시에도 락이 정상적으로 해제되는지 확인") |
213 | 207 | @Test |
214 | 208 | void testLock_ExceptionDuringExecution() throws Throwable { |
@@ -246,7 +240,6 @@ void testLock_ExceptionDuringExecution() throws Throwable { |
246 | 240 | } |
247 | 241 | } |
248 | 242 |
|
249 | | - @Order(6) |
250 | 243 | @DisplayName("SpEL 파싱을 통한 동적 키 생성이 정상적으로 작동하는지 확인") |
251 | 244 | @Test |
252 | 245 | void testGetLockKey_WithSpELExpression() throws Throwable { |
|
0 commit comments