Repository navigation
test: 통합 테스트에서 BCrypt 비용을 4로 낮춰 CI 시간을 줄인다 - #166
Merged
Merged
Conversation
운영 비용 12는 해시 한 번에 수백 ms라, 회원을 만들고 로그인하는 통합 테스트 400여 개에서 BCrypt가 테스트 시간의 큰 몫을 차지한다. 비용을 app.security.bcrypt-strength(기본 12)로 빼고 IntegrationTestSupport에서만 4로 낮춘다. 운영 동작은 그대로다.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
왜
CI의 Test 단계가 약 8분 43초 걸렸고, 대부분이 BCrypt였습니다.
BCryptPasswordEncoder(12)는 해시 한 번에 수백 ms가 걸립니다.바꾼 것
SecurityConfig가 비용을app.security.bcrypt-strength(기본 12)로 받습니다. 운영 동작은 그대로입니다.IntegrationTestSupport의@DynamicPropertySource에서만 4로 낮춥니다. 모든 통합 테스트 컨텍스트에 적용됩니다.matches는 비용이 다른 해시(예:AuthService의 더미 해시, 비용 12)도 그대로 검증합니다.측정 (GitHub Actions, Test 단계)
fork 병렬은 18초 차이밖에 나지 않아 넣지 않았습니다. Postgres 컨테이너와 컨텍스트 기동이 fork 수만큼 늘어나기 때문입니다.