Skip to content

Conversation

@Jjiggu
Copy link
Contributor

@Jjiggu Jjiggu commented Aug 12, 2025

작업 요약

  • 없는 store 조회 시 404 처리

Issue Link

#276

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 신규 기능
    • 없음
  • 버그 수정
    • 메뉴 조회 시 존재하지 않는 매장에 대한 검증을 추가하여, 유효하지 않은 매장 ID 요청 시 적절한 오류를 반환합니다.
  • 테스트
    • ReservationService의 상태 전이 및 Redis 연동 동작을 검증하는 단위 테스트 추가.
    • Redis 기반 대기열 저장소 동작(조회 null-safe, 삭제 흐름)을 검증하는 단위 테스트 추가.
    • Testcontainers 기반 Redis 통합 테스트로 중복/유령 데이터 및 동시 등록 시나리오 검증.
    • 테스트 인프라 강화를 위해 Testcontainers BOM 및 관련 모듈 의존성 추가.

@Jjiggu Jjiggu self-assigned this Aug 12, 2025
@Jjiggu Jjiggu added the refactor 리팩토링 label Aug 12, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

테스트 의존성(Testcontainers) 추가. 관리자 API에 예약/대기 Redis 로직을 검증하는 단위/통합 테스트 3종 추가. 사용자 API의 MenuService에 StoreRepository 의존성 및 가게 존재 확인 로직 도입(미존재 시 예외). 공개 API 시그니처 변화 없음.

Changes

Cohort / File(s) Summary
Build: Test deps
nowait-app-admin-api/build.gradle
테스트 의존성 추가: Testcontainers BOM 및 junit-jupiter, testcontainers 모듈.
Admin 예약/대기 테스트
nowait-app-admin-api/src/test/java/com/nowait/applicationadmin/reservation/ReservationServiceTest.java, .../WaitingRedisRepositoryTest.java, .../WaitingDuplicateIT.java
ReservationService 상태 전이/Redis 부작용 검증 단위 테스트, WaitingRedisRepository 삭제/널 세이프 동작 테스트, Redis Testcontainers 기반 대기열 중복/고스트 시나리오 통합 테스트 추가.
User 메뉴 서비스 검증
nowait-app-user-api/src/main/java/com/nowait/applicationuser/menu/service/MenuService.java
StoreRepository 필드 추가 및 가게 존재 여부 선검증 로직 추가(미존재 시 StoreNotFoundException). 메서드 시그니처 변경 없음.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant MenuService
  participant StoreRepository
  participant MenuRepository

  Client->>MenuService: getAllMenusByStoreId(storeId)
  MenuService->>StoreRepository: existsById(storeId) / findById(...)
  alt store not found
    MenuService-->>Client: throw StoreNotFoundException
  else store exists
    MenuService->>MenuRepository: findAllByStoreId(storeId) / findById(...)
    MenuService-->>Client: Menus / Menu
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Suggested labels

bug

Suggested reviewers

  • HyemIin

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a4f5b9 and c1150f6.

📒 Files selected for processing (5)
  • nowait-app-admin-api/build.gradle (1 hunks)
  • nowait-app-admin-api/src/test/java/com/nowait/applicationadmin/reservation/ReservationServiceTest.java (1 hunks)
  • nowait-app-admin-api/src/test/java/com/nowait/applicationadmin/reservation/WaitingDuplicateIT.java (1 hunks)
  • nowait-app-admin-api/src/test/java/com/nowait/applicationadmin/reservation/WaitingRedisRepositoryTest.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/menu/service/MenuService.java (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#276-menu-notfound

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot requested a review from HyemIin August 12, 2025 07:59
@Jjiggu Jjiggu merged commit c37dfca into develop Aug 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants