Skip to content

Conversation

@hyojeongchoi
Copy link
Contributor

public void checkKeyword() throws Exception {

//given
NaverNewsService.naverNewsApi();
Copy link
Member

Choose a reason for hiding this comment

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

이 라인이 추가된 것에 대해서 설명해주실 수 있나요?
롤백 기능이 추가된 것과 연관이 있는지요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

기존 테스트 코드에서는 @transactional을 하면 keywordTest에서 batch된 뉴스를 조회할 수 없어 keywordTest에서 실패가 자꾸 떴었습니다!
@transactional 레퍼런스를 찾아보다가 테스트 간의 격리성을 보장하기 위해 사용된다는 것을 알게되어 keywordTest에서도 NaverNewsApi를 사용하는 것으로 코드 수정 진행했습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants