Skip to content

Conversation

@Sangwook02
Copy link
Member

@Sangwook02 Sangwook02 commented Sep 16, 2025

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • test 돌릴 때마다 deprecated 메서드들 때문에 warning 뜨길래 제거했습니다.
  • 여전히 warning 뜨는 테스트가 있는데, test class 자체가 deprecated되거나 정책 변경에 의해 무의미해진 테스트들은 곧 삭제할 것 같아서 굳이 수정하지 않았습니다.

📝 참고사항

📚 기타

Summary by CodeRabbit

  • Refactor
    • 온라인 이벤트 참여 생성 과정을 단일 흐름으로 통합하여 일관성과 유지보수성을 개선했습니다.
    • 중복 로직을 제거해 구조를 간소화하고 향후 변경에 대한 안정성을 높였습니다.
  • Tests
    • 테스트 케이스와 테스트 헬퍼를 새로운 생성 흐름에 맞게 정비해 가독성을 높이고 중복을 줄였습니다.
    • 등록/미등록 시나리오를 공통 패턴으로 검증하도록 업데이트했습니다.

사용자 기능상의 변화는 없습니다.

@Sangwook02 Sangwook02 self-assigned this Sep 16, 2025
@Sangwook02 Sangwook02 requested a review from a team as a code owner September 16, 2025 12:35
@Sangwook02 Sangwook02 added the ✅ test 테스트 작업 label Sep 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

📝 Walkthrough

Walkthrough

테스트 코드에서 EventParticipation.createOnlineForRegistered / createOnlineForUnregistered 호출을 단일 팩토리 메서드 EventParticipation.createOnline으로 교체하고, Participant.of(...)를 통해 Participant를 생성해 첫 인자로 전달하도록 수정했습니다. 등록되지 않은 경우 Member는 null로 전달되며, 나머지 인자 순서는 새 시그니처에 맞춰 정렬되었습니다.

Changes

Cohort / File(s) Summary
테스트: 온라인 참여 생성 통합
src/test/java/com/gdschongik/gdsc/domain/event/application/EventParticipationServiceTest.java, src/test/java/com/gdschongik/gdsc/domain/event/domain/ParticipantRoleTest.java
테스트 헬퍼에서 createOnlineForRegistered/createOnlineForUnregistered 제거 후 createOnline(Participant, Member, AfterPartyApplicationStatus, AfterPartyAttendanceStatus, PaymentStatus, PaymentStatus, Event)로 일원화. Participant.of(name, studentId, phone)로 Participant 생성하여 첫 인자로 전달하고, 비회원 케이스는 Member에 null 전달.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Poem

당근 달빛 아래 키보드 톡톡톡,
두 갈래 길을 하나로 쏙-묶었네.
Participant 먼저, Member는 있을 수도 없을 수도,
테스트는 고개 끄덕, "이제 한 줄이면 OK!"
깡총—리팩토링 들판에 바람이 분다.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/1235-update-test-due-to-event-participation-login-change

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed 제목 "test: 이벤트 참여 신청 정책 변경에 따른 테스트 수정"은 PR의 주된 목적(이벤트 참여 신청 정책 변경으로 인한 테스트 수정)을 명확하고 간결하게 전달합니다. raw_summary와 pr_objectives에 나타난 EventParticipation.createOnline 시그니처 변경 및 테스트 호출 업데이트와 직접적으로 연관되어 있어 변경 내용과 일치합니다. 불필요한 파일 목록이나 이모지 없이 작성되어 팀원이 히스토리를 빠르게 이해하기에 적합합니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

@github-actions
Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link
Member

@kckc0608 kckc0608 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/test/java/com/gdschongik/gdsc/domain/event/domain/ParticipantRoleTest.java (1)

118-119: 표현 일관성: 기본 케이스는 UNPAID 대신 NONE이 더 자연스럽습니다.

뒤풀이 미신청(NOT_APPLIED) 시 결제 상태는 미발생(NONE)이 의미상 더 정확합니다.

적용 예시:

-                PaymentStatus.UNPAID,
-                PaymentStatus.UNPAID,
+                PaymentStatus.NONE,
+                PaymentStatus.NONE,
src/test/java/com/gdschongik/gdsc/domain/event/application/EventParticipationServiceTest.java (1)

1109-1110: 중복 Participant.of(...)를 헬퍼로 추출해 중복 감소 + 가독성 향상

여러 헬퍼에서 동일한 Participant 구성 로직이 반복됩니다. private 메서드로 추출하면 유지보수성이 좋아집니다.

대표 적용(diff — 1108~1111 인접 라인 기준):

-        EventParticipation eventParticipation = EventParticipation.createOnline(
-                Participant.of(member.getName(), member.getStudentId(), member.getPhone()),
+        EventParticipation eventParticipation = EventParticipation.createOnline(
+                toParticipant(member),

헬퍼 추가(파일 하단 임의 위치):

private Participant toParticipant(Member member) {
    return Participant.of(member.getName(), member.getStudentId(), member.getPhone());
}

Also applies to: 1122-1123, 1134-1135, 1146-1147, 1158-1159

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d2eb246 and 8a3f78f.

📒 Files selected for processing (2)
  • src/test/java/com/gdschongik/gdsc/domain/event/application/EventParticipationServiceTest.java (5 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/event/domain/ParticipantRoleTest.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-test
🔇 Additional comments (8)
src/test/java/com/gdschongik/gdsc/domain/event/domain/ParticipantRoleTest.java (1)

113-120: createOnline 단일 팩토리로의 전환은 적절합니다. event=null 허용만 확인 부탁드립니다.

도메인 제약에서 Event가 @nullable이 아니라면 간단한 Event 픽스처를 만들어 넘겨주세요. 현재 null 전달은 잠재적 NPE 지점입니다.

src/test/java/com/gdschongik/gdsc/domain/event/application/EventParticipationServiceTest.java (7)

1108-1116: LGTM — 새 시그니처(createOnline)로 안전하게 이행되었습니다.


1121-1129: LGTM — 뒤풀이 신청 케이스(APPLIED)도 새 시그니처에 맞게 정확히 반영되었습니다.


1133-1141: LGTM — 뒤풀이 비활성 케이스(NONE/NONE) 설정이 도메인 의미와 일치합니다.


1145-1153: LGTM — 미확인 상태(UNPAID/UNPAID) 초기화가 적절합니다.


1157-1165: LGTM — 확인 완료 상태(ATTENDED, PAID/PAID) 시나리오가 올바르게 구성되었습니다.


1169-1176: LGTM — 비회원 케이스에서 member=null 전달이 새 API 의도와 일치합니다.


1109-1110: 문제 없음 — 테스트 픽스처가 phone을 채웁니다

FixtureHelper.createAssociateMember(...)와 IntegrationTest.createAssociateMember()가 updateBasicMemberInfo(..., PHONE_NUMBER, ...)로 phone을 세팅합니다 (src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java:51-55, src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java:191-195). Member.phone 필드와 Participant.of(...)의 null 검증을 확인했습니다 (src/main/java/com/gdschongik/gdsc/domain/member/domain/Member.java:62, src/main/java/com/gdschongik/gdsc/domain/event/domain/Participant.java:39-41,63-66). 현재 해당 호출부(EventParticipationServiceTest#createEventParticipation 등)는 phone이 세팅된 멤버를 사용하므로 수정 불필요합니다.

Copy link
Member

@uwoobeat uwoobeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@kimsh1017 kimsh1017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Sangwook02 Sangwook02 merged commit f88e199 into develop Sep 16, 2025
4 checks passed
@Sangwook02 Sangwook02 deleted the test/1235-update-test-due-to-event-participation-login-change branch September 16, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ test 테스트 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✅ 이벤트 참여 신청 정책 변경에 따른 테스트 수정

5 participants