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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CategoryService 테스트 #656
CategoryService 테스트 #656
Changes from all commits
90b95b8
8cd2356
b61632c
50dfc51
d27d33a
13fcd51
c4b196f
091eaed
56371d4
36705fc
a44521e
7ba2589
a464827
7fa7938
ac3e9d1
1704cd0
b08fb67
8c248a6
81e2e23
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
카테고리도 Fixture가 있습니다! 활용하시면 좋을 것 같네용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
픽스쳐를 사용하는 건 좋은 의견이군요!
그런데, 지금은
member
의 서로 다른 두 카테고리를 저장해야 해요.픽스쳐는
MemberFixture.getFirstMember()
의 카테고리 하나와MemberFixture.getSecondMember()
의 카테고리 하나밖에 존재하지 않아서 직접 생성하는 것이 가장 좋을 것 같습니다!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
카테고리 없을 때 빈 리스트 반환하는 것도 추가해주심 좋을 것 같아용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정 성공 테스트가 현재 실패하는데요.
이유를 확인해 보니
Member.equals()
메서드의 아래 부분이 문제였습니다.현재
Category
의Member
필드에는 lazy loading 이 걸려있습니다.때문에 프록시 객체가
Member
필드로 들어가게 되고, 클래스 비교에서false
가 반환되는 것이 문제입니다.프로덕션 코드의 수정이 일어나야 해 이슈에 남겨두고 넘어가겠습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
원활한 CI 진행을 위해 @disabled 처리를 해놓는 건 어떤가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#650, #664 관련 이슈 코멘트합니다.