test: ScrapService 단위 테스트 추가 + 스크랩 취소 NPE 수정 - #217
Conversation
createAndDeleteScrap/getScrapCourseByUser 전체 메서드에 대해 정상 케이스 + 예외 케이스 + 경계값 검증 (9개). 테스트 작성 중 발견해서 수정한 버그: - createAndDeleteScrap: 스크랩한 적 없는 코스를 "취소"(scrapTF=false) 요청하면 scrap 변수가 null이라 scrap.updateScrapTF(false) 호출 시 바로 NPE(500)가 났음. 클라이언트가 중복 취소 요청을 보내거나 race condition만 있어도 쉽게 재현 가능한 케이스라 조건 분기 추가로 null이면 조용히 무시하도록 수정 (idempotent하게).
|
Warning Review limit reached
Next review available in: 4 minutes 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
작업 배경
변경 사항
ScrapService.createAndDeleteScrapScrapServiceTest영향 범위
검증 매트릭스
신규_스크랩•
기존_스크랩_재활성화•
스크랩_취소스크랩한_적_없는_코스_취소_요청은_무시된다존재하지_않는_유저•
존재하지_않는_공개코스정상_조회•
스크랩_없음•
조회_결과가_없으면_예외Test Plan
./gradlew build전체(기존 ServerApplicationTests 포함) 통과 확인🤖 Generated with Claude Code