Conversation
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.
❤️ 기능 설명
ReadPost최초 조회 판정을first_read_posts (user_id, post_id)유니크 제약 기반으로 변경했습니다.PostCommandService.incrementViewCount()를 호출하도록 바꿨습니다.READ_POST_VIEW_COUNT_INCREMENT_FAILED예외를 던져first_read_posts마킹과read_posts저장이 함께 롤백되도록 보강했습니다.ReadPostCommandServiceConcurrencyIntegrationTest를 추가해 같은 사용자/게시글 동시 요청에서viewCount가 1회만 증가하는지 검증했습니다.swagger 테스트 성공 결과 스크린샷 첨부
→ CLI 환경이라 스크린샷은 첨부하지 못했고, 아래 테스트 결과로 대체합니다.
테스트 결과
./gradlew test --tests 'com.techfork.activity.readpost.application.command.ReadPostCommandServiceTest' --tests 'com.techfork.activity.readpost.infrastructure.FirstReadPostRepositoryTest'./gradlew integrationTest --tests 'com.techfork.activity.readpost.integration.ReadPostCommandServiceConcurrencyIntegrationTest'연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #385
🩷 Approve 하기 전 확인해주세요!
ReadPostCommandServiceConcurrencyIntegrationTest중심으로 확인 부탁드립니다.✅ 체크리스트