[SCRUM-5] QueryWaitingQueueService 단위 테스트 작성 및 ReactiveCacheManager Supplier 적용 - #5
Open
pjh612 wants to merge 1 commit into
Open
[SCRUM-5] QueryWaitingQueueService 단위 테스트 작성 및 ReactiveCacheManager Supplier 적용#5pjh612 wants to merge 1 commit into
pjh612 wants to merge 1 commit into
Conversation
…upplier 적용 - QueryWaitingQueueServiceTest 작성 (캐시 HIT/MISS, 에러 반환, 캐시 키 형식 검증) - ReactiveCacheManager.getOrSet() 파라미터를 Mono<T>에서 Supplier<Mono<T>>로 변경하여 lazy 평가 계약을 API 시그니처에 명시 - ReactiveRedisCacheManager 내부에서 Mono.defer(fallback) 호출로 lazy 평가 강제 - QueryWaitingQueueService 호출부를 람다 방식으로 변경 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
QueryWaitingQueueService.getWaitingQueue()단위 테스트 4개 작성 (커버리지 100%)ReactiveCacheManager.getOrSet()파라미터를Mono<T>→Supplier<Mono<T>>로 변경하여 lazy 평가 계약을 API 시그니처에 명시ReactiveRedisCacheManager내부에서Mono.defer(fallback)호출로 lazy 평가를 캐시 매니저가 직접 강제변경 파일
ReactiveCacheManager.javagetOrSet()파라미터 타입Supplier<Mono<T>>로 변경ReactiveRedisCacheManager.javaMono.defer(fallback)적용QueryWaitingQueueService.java() -> ...)로 전달QueryWaitingQueueServiceTest.java테스트 시나리오
getWaitingQueue_캐시HIT_캐시결과반환— 캐시 히트 시 repository 미호출 검증getWaitingQueue_캐시MISS_레포지토리조회후3600초TTL로캐싱— 캐시 미스 시 repository 호출 및 TTL=3600 검증getWaitingQueue_유효하지않은API키_에러반환— 잘못된 키 조회 시 에러 전파 검증getWaitingQueue_캐시키형식검증—"queue:" + apiKey형식 캐시 키 생성 검증커버리지 결과 (QueryWaitingQueueService)
Test plan
Jira: SCRUM-5
🤖 Generated with Claude Code