Conversation
|
refactor/UDT-276-추천-서비스-분리 브랜치 빌드 테스트에 성공했습니다! 🎉 |
|
refactor/UDT-276-추천-서비스-분리 브랜치 빌드 테스트에 성공했습니다! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 요약(Summary)
무엇을 수정했나요?
콘텐츠 추천 서비스의 막대한 역할을 4개의 비즈니스 컴포넌트로 분리하여 콘텐츠 추천 서비스 클래스의 코드를 줄여나갔습니다.
그로 인한 여러 클래스들이 생성 및 테스트 코드 구현을 했습니다.
왜?
ContentRecommendationService가 269줄의 복잡한 로직을 포함하며, 장르 분석, 점수 계산, 쿼리 빌드, 응답 생성 등 여러 책임을 가지고 있었습니다.주요 변경 사항
4개의 새로운 컴포넌트 생성:
RecommendationScoreCalculator: 추천 점수 계산 로직 (171줄)GenreAnalyzer: 장르 분석 및 파싱 로직 (73줄)RecommendationQueryBuilder: 플랫폼 필터링 쿼리 생성 (48줄)RecommendationResponseBuilder: 추천 응답 빌드 (43줄)기존 서비스 클래스 간소화:
ContentRecommendationService: 269줄 → 약 100줄로 감소테스트 커버리지 강화:
💬 공유사항 to 리뷰어
고민: ContentRecommendationService 테스트 코드의 목적 -> 각 분리 클래스들의 상호작용을 테스트하자.
결론: Slice Test 전략 채택
기존 방식
적절한 접근 방식
왜 이렇게 변경했나요?
테스트 코드 변경 사항
shouldRecommendActionThrillerContent → shouldBoostScoreForPreferredGenres
shouldFilterByPlatform: 플랫폼 필터링 협력 검증
mockLuceneSearchService()
리뷰 요청 사항
컴포넌트 분리 기준이 적절한지 검토 부탁드립니다.
테스트 작성 방식에 대한 의견 부탁드립니다.
new연산자로 직접 생성하는 방식에 대한 의견참고사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
🤔 Review 예상 시간