prgrms-web-devcourse / Team-Meoguri-Linkocean-BE

팀 머구리의 링크 오션 벡엔드 입니다
http://team-meoguri-linkocean-fe.vercel.app/
2 stars 0 forks source link

[LO-214] 서비스 테스트 @Transactional 제거하기 #216

Closed hyuk0309 closed 2 years ago

hyuk0309 commented 2 years ago

🛠️ 작업 내용

🗨️ 기타


통합 테스트와 트랜잭션 관련 글이 있는데 저와 생각이 비슷한 것 같아 공유드립니다! (참조)

  • The production code is using transactions with different scope.
  • It is easy to forget about a flush and thus have false positive in test.
  • On failure and when debugging it is hard to see what values were actually saved in db.
  • It is much harder to write tests of production code that requires a transaction to be committed.
  • The test code needs to be more tightly coupled to production code and we all know that it hinders refactoring.

😎 리뷰어

@ndy2 , @jk05018

github-actions[bot] commented 2 years ago

Unit Test Results

233 tests   233 :heavy_check_mark:  42s :stopwatch:   72 suites      0 :zzz:   72 files        0 :x:

Results for commit bfd1cf63.

:recycle: This comment has been updated with latest results.