Skip to content

test: 통합 테스트에서 BCrypt 비용을 4로 낮춰 CI 시간을 줄인다 - #166

Merged
ff1451 merged 1 commit into
mainfrom
chore/ci-speed
Oct 18, 2026
Merged

ff1451 merged 1 commit into
mainfrom
chore/ci-speed

Conversation

@ff1451

@ff1451 ff1451 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

왜

CI의 Test 단계가 약 8분 43초 걸렸고, 대부분이 BCrypt였습니다.

  • 운영 BCryptPasswordEncoder(12)는 해시 한 번에 수백 ms가 걸립니다.
  • 통합 테스트 422개가 거의 모두 회원을 만들고(encode) 로그인(matches)합니다.

바꾼 것

  • SecurityConfig가 비용을 app.security.bcrypt-strength(기본 12)로 받습니다. 운영 동작은 그대로입니다.
  • IntegrationTestSupport의 @DynamicPropertySource에서만 4로 낮춥니다. 모든 통합 테스트 컨텍스트에 적용됩니다.
  • 해시에는 비용이 기록되므로 matches는 비용이 다른 해시(예: AuthService의 더미 해시, 비용 12)도 그대로 검증합니다.

측정 (GitHub Actions, Test 단계)

시간
기존 8분 43초
이 PR 3분 27초
이 PR + Gradle fork 2개(#167) 3분 9초

fork 병렬은 18초 차이밖에 나지 않아 넣지 않았습니다. Postgres 컨테이너와 컨텍스트 기동이 fork 수만큼 늘어나기 때문입니다.

운영 비용 12는 해시 한 번에 수백 ms라, 회원을 만들고 로그인하는 통합 테스트 400여 개에서
BCrypt가 테스트 시간의 큰 몫을 차지한다. 비용을 app.security.bcrypt-strength(기본 12)로 빼고
IntegrationTestSupport에서만 4로 낮춘다. 운영 동작은 그대로다.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 23a73261-a5a2-47dc-b911-38f4c45fedac
📥 Commits

Reviewing files that changed from the base of the PR and between 4050438 and 358a30a.

📒 Files selected for processing: 2
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/config/SecurityConfig.java
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/IntegrationTestSupport.java
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ff1451
ff1451 marked this pull request as ready for review October 18, 2026 13:27
@ff1451
ff1451 merged commit dd4c3d0 into main Oct 18, 2026
2 checks passed
@ff1451
ff1451 deleted the chore/ci-speed branch October 18, 2026 13:51
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.

1 participant