Skip to content

Commit 121645a

Browse files
authored
fix(be): stabilize room pagination ordering (#119)
-기존 채팅방의 updatedAt을 기준 시각으로 사용 -페이징 결과의 첫 번째 방이 예상한 방과 일치하도록 보장
1 parent 914276e commit 121645a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/test/kotlin/com/back/koreaTravelGuide/domain/userChat/chatroom/controller/ChatRoomControllerTest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post
2626
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath
2727
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
2828
import org.springframework.transaction.annotation.Transactional
29-
import java.time.ZoneId
30-
import java.time.ZonedDateTime
3129

3230
@ActiveProfiles("test")
3331
@SpringBootTest
@@ -95,7 +93,7 @@ class ChatRoomControllerTest {
9593
@Test
9694
@DisplayName("listRooms returns paginated rooms with cursor")
9795
fun listRoomsReturnsPaginatedRooms() {
98-
val baseTime = ZonedDateTime.now(ZoneId.of("Asia/Seoul"))
96+
val baseTime = existingRoom.updatedAt
9997
val extraRooms =
10098
(1..6).map { idx ->
10199
val extraGuide =

0 commit comments

Comments
 (0)