Skip to content

test: JwtService/UserIdResolver 단위 테스트 추가 + dev CI 테스트 실행 - #212

Merged
unam98 merged 3 commits into
devfrom
tests/jwt-userid-resolver-unit-tests
Aug 5, 2026
Merged

test: JwtService/UserIdResolver 단위 테스트 추가 + dev CI 테스트 실행#212
unam98 merged 3 commits into
devfrom
tests/jwt-userid-resolver-unit-tests

Conversation

@unam98

@unam98 unam98 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

배경

프로젝트에 실질적인 테스트 코드가 전무했음 (ServerApplicationTests.contextLoads() 하나뿐, 로직 검증 없음). 게다가 dev-ci.yml-x test로 테스트 실행 자체를 건너뛰고 있어서, 테스트를 짜도 CI에서 검증이 안 되는 상태였음.

오늘 MDC userId 로깅 작업(#211) 하면서 만든 JwtService/UserIdResolver부터 테스트 커버리지 시작.

변경 사항

  • JwtServiceTest: 토큰 발급 후 검증 성공, userId 클레임 추출, 형식 오류/만료 토큰 판정
  • UserIdResolverTest: accessToken/refreshToken 누락, 방문자 모드, 만료/무효 토큰, 정상 토큰의 userId 파싱 및 MDC 반영, 숫자 아닌 클레임 예외
  • dev-ci.yml: -x test 제거

검증

  • 로컬에서 신규 테스트 12개 전부 통과 (JwtServiceTest 4개, UserIdResolverTest 8개)
  • 로컬 DB/Redis 띄우고 ./gradlew build 전체(기존 ServerApplicationTests 포함) 통과 확인

- JwtServiceTest: 토큰 발급/검증/만료/클레임 추출 검증
- UserIdResolverTest: 토큰 누락/만료/무효, 방문자 모드, userId 파싱 및 MDC 반영 검증
- dev-ci.yml: `-x test` 제거 — 지금까지 테스트가 아예 실행 안 되고 있었음
@unam98 unam98 self-assigned this Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@unam98, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 22a45160-6a3b-454c-864a-e147a8aaf3ac

📥 Commits

Reviewing files that changed from the base of the PR and between c8055b0 and 4c83df7.

📒 Files selected for processing (3)
  • .github/workflows/dev-ci.yml
  • src/test/java/org/runnect/server/common/resolver/userId/UserIdResolverTest.java
  • src/test/java/org/runnect/server/config/jwt/JwtServiceTest.java

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.

alh0409 added 2 commits August 5, 2026 17:12
-x test 제거 직후 CI에서 ServerApplicationTests가 SocketTimeoutException으로 실패함
— GitHub Actions 러너에서 실제 dev DB/Redis로 네트워크가 안 닿는 게 원인.
CI에 postgres/redis 서비스 컨테이너를 띄우고 SPRING_DATASOURCE_URL/
SPRING_DATA_REDIS_HOST 환경변수로 그쪽을 바라보게 해서 해결.
@unam98
unam98 merged commit 1ea4b11 into dev Aug 5, 2026
2 checks passed
@unam98
unam98 deleted the tests/jwt-userid-resolver-unit-tests branch August 5, 2026 08:22
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.

2 participants