test: UserRepositoryTest flaky 실패 수정 (정렬 없는 페이지 조회) - #228
Conversation
findAdminUsers 호출 시 PageRequest.of(0, 20)에 정렬 기준이 없어서, docgrid_test 스키마에 다른 테스트가 남긴 row가 쌓이면 방금 만든 row가 1페이지 20개 안에 든다는 보장이 없었다. id 내림차순 정렬을 명시해 방금 만든(가장 큰 id) row가 항상 1페이지에 포함되도록 고정했다. 32개 row가 쌓인 상태로 재현 테스트해서 정상 통과를 확인했다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 13 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
#226작업 검증 중(필터 없는 전체 테스트 실행) 발견한 flaky 테스트를 수정합니다.UserRepositoryTest.findAdminUsers_*가PageRequest.of(0, 20)으로 페이지를 조회하는데 정렬(Sort) 기준이 없었습니다.docgrid_test스키마는 여러@SpringBootTest통합 테스트가 커밋한 row가 정리되지 않고 계속 쌓이는 구조라(별도 이슈 후보), row가 20개를 넘어가면 "1페이지 20개"가 어떤 20개인지 PostgreSQL이 보장해주지 않습니다. 그래서 테스트가 방금 만든 row가 그 안에 포함되는지 매번 운에 달려 있었습니다.Changes
id내림차순 정렬(Sort.by(Sort.Direction.DESC, "id"))을 명시해서, 방금 생성한(=가장 큰 id) row가 항상 1페이지에 포함되도록 고정했습니다.Test plan
./backend/gradlew -p backend test --tests "...UserRepositoryTest"단독 실행 통과./backend/gradlew -p backend test --tests "com.opensource.docgrid.domain.user.*" --tests "com.opensource.docgrid.domain.auth.*"전체 통과🤖 Generated with Claude Code