Skip to content
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

[BE] refactor: 테스트 환경에서 캐싱을 사용하도록 하여 환경 통일 #1007

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

donghoony
Copy link
Contributor


🚀 어떤 기능을 구현했나요 ?

  • 프로덕션 환경에서의 변화는 없습니다.
  • 테스트 코드가 추가되지 않았고, 환경 일치만 진행했습니다.
  • 테스트 환경에서의 Cache를 활성화했습니다. 이로써 테스트로 캐싱을 확인할 수 있습니다.

🔥 어떻게 해결했나요 ?

  • CacheCleanerExtension을 만들었습니다. 앞으로 @ServiceTest가 붙은 친구들은 데이터베이스 격리와 더불어 캐싱 격리가 진행됩니다.

📝 어떤 부분에 집중해서 리뷰해야 할까요?

  • 보다 나은 방식이 있다면 추천해주세요~

Copy link

Test Results

157 tests   154 ✅  4s ⏱️
 58 suites    3 💤
 58 files      0 ❌

Results for commit 7a137a5.

Copy link
Contributor

@nayonsoso nayonsoso left a comment

Choose a reason for hiding this comment

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

굳~ 좋네요 ㅎㅎ

캐시 클리너가 적용되는 테스트 함수를 개발자가 지정할 수 있게, 어노테이션이 별도로 필요할까 싶었는데,..
@ServiceTest에 캐시 클리너가 포함되는게 인지부하도 적고 좋은 것 같습니다.
직접 테스트를 돌려보니 시간도 거의 동일하네요

@donghoony donghoony merged commit 6b8d313 into develop Dec 17, 2024
9 checks passed
@donghoony donghoony deleted the be/refactor/1006-test-env-enable-cache branch December 17, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 테스트 환경에서도 캐시를 활용하도록 환경을 일치시킨다.
4 participants